Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 617624

Summary: sys-libs/libfaketime: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
Product: Gentoo Linux Reporter: Thomas Deutschmann (RETIRED) <whissi>
Component: Current packagesAssignee: Thomas Deutschmann (RETIRED) <whissi>
Status: RESOLVED FIXED    
Severity: normal CC: plevine457
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.debian.org/811610
https://bugs.gentoo.org/show_bug.cgi?id=632542
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    

Description Thomas Deutschmann (RETIRED) gentoo-dev 2017-05-06 06:04:40 UTC
>>> Compiling source in /var/tmp/portage/sys-libs/libfaketime-0.9.6-r1/work/libfaketime-0.9.6 ...
make --jobs 6 CC=x86_64-pc-linux-gnu-gcc LIBDIRNAME=/lib64 PREFIX=/usr 
make  -C src all
make[1]: Entering directory '/var/tmp/portage/sys-libs/libfaketime-0.9.6-r1/work/libfaketime-0.9.6/src'
x86_64-pc-linux-gnu-gcc -o libfaketime.o -c -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -std=gnu99 -Wall -Wextra -Werror -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'/usr'"' -DLIBDIRNAME='"'/lib64'"'  libfaketime.c
x86_64-pc-linux-gnu-gcc -o libfaketimeMT.o -c -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -std=gnu99 -Wall -Wextra -Werror -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'/usr'"' -DLIBDIRNAME='"'/lib64'"'  libfaketime.c
x86_64-pc-linux-gnu-gcc -o faketime -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -std=gnu99 -Wall -Wextra -Werror -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'/usr'"' -DLIBDIRNAME='"'/lib64'"'  faketime.c -Wl,-O1 -Wl,--as-needed -Wl,--version-script=libfaketime.map -lpthread -lrt
libfaketime.c: In function ‘__xstat’:
libfaketime.c:513:7: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
    if (buf != NULL)
       ^
libfaketime.c: In function ‘__fxstat’:
libfaketime.c:542:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__fxstatat’:
libfaketime.c:571:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__lxstat’:
libfaketime.c:600:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__xstat64’:
libfaketime.c:628:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__fxstat64’:
libfaketime.c:656:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__fxstatat64’:
libfaketime.c:685:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__lxstat64’:
libfaketime.c:714:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__xstat’:
libfaketime.c:513:7: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
    if (buf != NULL)
       ^
libfaketime.c: In function ‘__fxstat’:
libfaketime.c:542:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__fxstatat’:
libfaketime.c:571:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__lxstat’:
libfaketime.c:600:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__xstat64’:
libfaketime.c:628:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__fxstat64’:
libfaketime.c:656:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__fxstatat64’:
libfaketime.c:685:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
libfaketime.c: In function ‘__lxstat64’:
libfaketime.c:714:6: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
   if (buf != NULL)
      ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:88: libfaketimeMT.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[1]: *** [Makefile:88: libfaketime.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-libs/libfaketime-0.9.6-r1/work/libfaketime-0.9.6/src'
make: *** [Makefile:7: all] Error 2
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2017-05-06 06:06:21 UTC
Two options, either we apply a patch like https://build.opensuse.org/package/view_file/openSUSE:Factory/libfaketime/libfaketime-0.9.6-gcc6.patch or we set -Wno-nonnull-compare (see upstream's comment https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811610#34).