Re: avoid some warnings

2010-02-04 Thread Eric Blake
According to Jim Meyering on 2/1/2010 6:56 AM: >> int (*f) (struct timeval *, GETTIMEOFDAY_TIMEZONE *); > > Sounds reasonable. > Done. Tested on cygwin (always works), mingw (always replaced), and on Linux under both -D_GNU_SOURCE (configure prints almost, no longer replaced) and -D_POSIX_C_SOU

Re: avoid some warnings

2010-02-01 Thread Eric Blake
According to Jim Meyering on 2/1/2010 6:56 AM: >> int (*f) (struct timeval *, GETTIMEOFDAY_TIMEZONE *); > > Sounds reasonable. By the way, I haven't forgotten that forkpty and openpty also need help to avoid signature check warnings: http://lists.gnu.org/archive/html/bug-gnulib/2009-12/msg00312.h

Re: avoid some warnings

2010-02-01 Thread Jim Meyering
Eric Blake wrote: > In the process of preparing to release m4 1.4.14, I noticed several > warnings when compiling on Fedora Core 12. I'm still working on silencing > the warning about gettimeofday having an incompatible second argument type > on glibc when using _GNU_SOURCE; I think the only sane

Re: avoid some warnings in tests

2009-10-29 Thread Eric Blake
Simon Josefsson josefsson.org> writes: > > In coreutils, I turned on gcc warnings for the gnulib unit tests. This > > cleans up the modules that are mainly from Jim and myself, and mostly hits > > places that used 'main ()' or did 'char *foo = "str"'. Simon and Bruno > > had the most other test

Re: avoid some warnings in tests

2009-10-25 Thread Bruno Haible
Ben Pfaff wrote: > > - There is no reason for GCC to warn about foo(). > > Probably Eric is using -Wstrict-prototypes: > > `-Wstrict-prototypes (C and Objective-C only)' > Warn if a function is declared or defined without specifying the > argument types. (An old-style fun

Re: avoid some warnings in tests

2009-10-24 Thread Ben Pfaff
Bruno Haible writes: > According to my understanding of C99, > - foo() as a function _definition_ defines a function with 0 arguments, > not with varargs. (Things are different for a function _declaration_ > without a body.) Yes. > - There is no reason for GCC to warn about foo().

Re: avoid some warnings in tests

2009-10-24 Thread Bruno Haible
Hi Eric, > Simon and Bruno > had the most other tests that used 'main ()'; C89 says you should use > 'main (void)' or 'main (int, char**)' Can you please show me where C89 or C99 says that 'main()' should not be used? According to my understanding of C99, - foo() as a function _definition_ def

Re: avoid some warnings in tests

2009-10-23 Thread Simon Josefsson
Eric Blake writes: > In coreutils, I turned on gcc warnings for the gnulib unit tests. This > cleans up the modules that are mainly from Jim and myself, and mostly hits > places that used 'main ()' or did 'char *foo = "str"'. Simon and Bruno > had the most other tests that used 'main ()'; C89 s