Bug#811610: FTBFS with GCC 6: nonnull argument compared to NULL

2016-07-05 Thread Mike Gerow
Hmm... So the reason gcc is complaining is because of this line in
/usr/include/x86_64-linux-gnu/sys/stat.h (on amd64 at least):

extern int __xstat (int __ver, const char *__filename,
struct stat *__stat_buf) __THROW __nonnull ((2, 3));

I'm still not sure if this is common amongst libcs or not, but this seems like a
situation where disabling the warning might be the right move.

-- 
Mike Gerow
ge...@mgerow.com


signature.asc
Description: PGP signature


Bug#811610: FTBFS with GCC 6: nonnull argument compared to NULL

2016-01-19 Thread Martin Michlmayr
Package: faketime
Version: 0.9.6-4
Severity: important
User: debian-...@lists.debian.org
Usertags: ftbfs-gcc-6 gcc-6-nonnull

This package fails to build with GCC 6.  GCC 6 has not been released
yet, but it's expected that GCC 6 will become the default compiler for
stretch.

Note that only the first error is reported; there might be more.  You
can find a snapshot of GCC 6 in experimental.  To build with GCC 6,
you can set CC=gcc-6 CXX=g++-6 explicitly.

> sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
> make[2]: Entering directory '/<>/src'
> cc -o libfaketime.o -c -g -O2 -fstack-protector-strong -Wformat 
> -Werror=format-security -DMULTI_ARCH -std=gnu99 -Wall -Wextra -Werror 
> -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC 
> -DPREFIX='"'/usr'"' -DLIBDIRNAME='"'/lib/faketime'"'  libfaketime.c
> libfaketime.c: In function '__xstat':
> libfaketime.c:513:12: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
> if (buf != NULL)
> ^~
> 
> libfaketime.c: In function '__fxstat':
> libfaketime.c:542:11: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
>if (buf != NULL)
>^~
> 
> libfaketime.c: In function '__fxstatat':
> libfaketime.c:571:11: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
>if (buf != NULL)
>^~
> 
> libfaketime.c: In function '__lxstat':
> libfaketime.c:600:11: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
>if (buf != NULL)
>^~
> 
> libfaketime.c: In function '__xstat64':
> libfaketime.c:628:11: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
>if (buf != NULL)
>^~
> 
> libfaketime.c: In function '__fxstat64':
> libfaketime.c:656:11: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
>if (buf != NULL)
>^~
> 
> libfaketime.c: In function '__fxstatat64':
> libfaketime.c:685:11: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
>if (buf != NULL)
>^~
> 
> libfaketime.c: In function '__lxstat64':
> libfaketime.c:714:11: error: nonnull argument 'buf' compared to NULL 
> [-Werror=nonnull]
>if (buf != NULL)
>^~
> 
> cc1: all warnings being treated as errors

-- 
Martin Michlmayr
Linux for HPE Helion, Hewlett Packard Enterprise