Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617624 - sys-libs/libfaketime: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
Summary: sys-libs/libfaketime: error: nonnull argument ‘buf’ compared to NULL [-Werror...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Deutschmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2017-05-06 06:04 UTC by Thomas Deutschmann (RETIRED)
Modified: 2017-09-30 15:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).