From 6c5b67981e26efd9816ee42393bbafce4c354142 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 14 Apr 2004 15:56:39 -0400 Subject: [PATCH] ENH: remove warnings from try compiles --- Modules/CheckFunctionExists.c | 9 +++++++-- Modules/TestBigEndian.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c index e205b6405..e064c092e 100644 --- a/Modules/CheckFunctionExists.c +++ b/Modules/CheckFunctionExists.c @@ -2,10 +2,15 @@ char CHECK_FUNCTION_EXISTS(); -int main() +int main(int ac, char*av[]) { + int ret = 0; CHECK_FUNCTION_EXISTS(); - return 0; + if(ac > 100) + { + ret = *av[0]; + } + return ret; } #else /* CHECK_FUNCTION_EXISTS */ diff --git a/Modules/TestBigEndian.c b/Modules/TestBigEndian.c index c21cc7e49..97647edd0 100644 --- a/Modules/TestBigEndian.c +++ b/Modules/TestBigEndian.c @@ -1,4 +1,5 @@ -int main () { +int main (int ac, char*av[]) { + int ret = 1; /* Are we little or big endian? From Harbison&Steele. */ union { @@ -6,5 +7,9 @@ int main () { char c[sizeof (long)]; } u; u.l = 1; - return (u.c[sizeof (long) - 1] == 1)?1:0; + if(ac > 100) + { + ret = *av[0]; + } + return (u.c[sizeof (long) - 1] == 1)?ret:0; }