From 15f9f50779d103a04a160583902a045bfb10f3c1 Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Thu, 21 Aug 2008 18:33:05 +0000 Subject: [PATCH] Some corrections and simplifications. Note that 'int main(void)' is correct C, see ISO C99 5.1.2.2.1 (probably older versions too, but I can't verify that.) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3037 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/build/unix/config_functions | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sc2/build/unix/config_functions b/sc2/build/unix/config_functions index 38642dc45..4419f7e38 100644 --- a/sc2/build/unix/config_functions +++ b/sc2/build/unix/config_functions @@ -493,9 +493,7 @@ have_library() { TEMP_LDFLAGS=`evalVar LIB_${LIB}_LDFLAGS` try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF -int main(int argc, char *argv[]) { - (void) argc; /* Get rid of unused variable warning */ - (void) argv; /* Get rid of unused variable warning */ +int main(void) { return 0; } EOF @@ -712,7 +710,7 @@ have_header() { try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF > /dev/null 2>&1 $EXTRA #include <$HEADER> -int main() { +int main(void) { return 0; } EOF @@ -765,7 +763,7 @@ $EXTRA #ifndef $MACRO # error #endif -int main() { +int main(void) { return 0; } EOF @@ -833,7 +831,7 @@ check_endianness() { else # Detect endianness try_compile_and_run_c "$CFLAGS" "$LDFLAGS" << EOF -int main() { +int main(void) { int i; i = 1;