[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid some warnings
From: |
Jim Meyering |
Subject: |
Re: avoid some warnings |
Date: |
Mon, 01 Feb 2010 14:56:52 +0100 |
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 solution is to
> define GETTIMEOFDAY_TIMEZONE to either 'struct timezone' or 'void', and
> recommend that application writers that need to use a function pointer use
> the prototype:
> int (*f) (struct timeval *, GETTIMEOFDAY_TIMEZONE *);
Sounds reasonable.
> then updating the signature check in tests/test-gettimeofday.c
> accordingly. But in the meantime, here's what I'm pushing as prerequisite
> to fixing gettimeofday:
>
...
> Subject: [PATCH 1/3] tests: silence warning about system return
>
> Silence a compiler warning for platforms that mark system()
> with attribute warn_unused_result.
>
> * tests/test-areadlink-with-size.c (main): Ignore system result.
> * tests/test-areadlink.c (main): Likewise.
> * tests/test-areadlinkat-with-size.c (main): Likewise.
> * tests/test-areadlinkat.c (main): Likewise.
> * tests/test-canonicalize-lgpl.c (main): Likewise.
> * tests/test-canonicalize.c (main): Likewise.
> * tests/test-chown.c (main): Likewise.
...
A decrease in test-related warnings is always welcome.