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
This commit is contained in:
Meep-Eep
2008-08-21 18:33:05 +00:00
parent f0d9b3b143
commit 15f9f50779
+4 -6
View File
@@ -493,9 +493,7 @@ have_library() {
TEMP_LDFLAGS=`evalVar LIB_${LIB}_LDFLAGS` TEMP_LDFLAGS=`evalVar LIB_${LIB}_LDFLAGS`
try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF
int main(int argc, char *argv[]) { int main(void) {
(void) argc; /* Get rid of unused variable warning */
(void) argv; /* Get rid of unused variable warning */
return 0; return 0;
} }
EOF EOF
@@ -712,7 +710,7 @@ have_header() {
try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF > /dev/null 2>&1 try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF > /dev/null 2>&1
$EXTRA $EXTRA
#include <$HEADER> #include <$HEADER>
int main() { int main(void) {
return 0; return 0;
} }
EOF EOF
@@ -765,7 +763,7 @@ $EXTRA
#ifndef $MACRO #ifndef $MACRO
# error # error
#endif #endif
int main() { int main(void) {
return 0; return 0;
} }
EOF EOF
@@ -833,7 +831,7 @@ check_endianness() {
else else
# Detect endianness # Detect endianness
try_compile_and_run_c "$CFLAGS" "$LDFLAGS" << EOF try_compile_and_run_c "$CFLAGS" "$LDFLAGS" << EOF
int main() { int main(void) {
int i; int i;
i = 1; i = 1;