Page MenuHome GnuPG

Some Build Warnings for gnupg-2.2.3 on Ubuntu 17.10
Closed, ResolvedPublic

Description

There are a handful of build warnings that are shown during make on Ubuntu 17.10 with GCC 7.2. This is a fresh box using Vagrant and the official Ubuntu box ubuntu/artful64.

1:

gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\"" -DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/usr/local/var\""        -I/usr/local/include -I/usr/local/include  -I/usr/local/include -DWITHOUT_NPTH=1 -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -MT libcommon_a-dotlock.o -MD -MP -MF .deps/libcommon_a-dotlock.Tpo -c -o libcommon_a-dotlock.o `test -f 'dotlock.c' || echo './'`dotlock.c
dotlock.c: In function ‘use_hardlinks_p’:
dotlock.c:624:3: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result [-Wunused-result]
   (void) link (tname, lname);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
dotlock.c: In function ‘dotlock_take_unix’:
dotlock.c:1071:7: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result [-Wunused-result]
       (void) link (h->tname, h->lockname);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2:

gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\"" -DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/usr/local/var\""        -I/usr/local/include -I/usr/local/include  -I/usr/local/include -DWITHOUT_NPTH=1 -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -MT libcommon_a-signal.o -MD -MP -MF .deps/libcommon_a-signal.Tpo -c -o libcommon_a-signal.o `test -f 'signal.c' || echo './'`signal.c
signal.c: In function ‘got_fatal_signal’:
signal.c:111:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void)write (2, "\n", 1 );
   ^~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:114:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     (void)write(2, s, strlen (s));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:115:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void)write (2, ": signal ", 9 );
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:118:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     (void) write (2, s, strlen(s) );
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:128:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
         (void)write (2, "?", 1);
         ^~~~~~~~~~~~~~~~~~~~~~~
signal.c:137:19: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                   (void)write (2, &"0123456789"[value/i], 1);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:145:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void)write (2, " caught ... exiting\n", 20);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3:

gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\"" -DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/usr/local/var\""        -I/usr/local/include -I/usr/local/include  -I/usr/local/include  -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -MT libcommonpth_a-dotlock.o -MD -MP -MF .deps/libcommonpth_a-dotlock.Tpo -c -o libcommonpth_a-dotlock.o `test -f 'dotlock.c' || echo './'`dotlock.c
dotlock.c: In function ‘use_hardlinks_p’:
dotlock.c:624:3: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result [-Wunused-result]
   (void) link (tname, lname);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
dotlock.c: In function ‘dotlock_take_unix’:
dotlock.c:1071:7: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result [-Wunused-result]
       (void) link (h->tname, h->lockname);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4:

gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\"" -DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/usr/local/var\""        -I/usr/local/include -I/usr/local/include  -I/usr/local/include  -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -MT libcommonpth_a-signal.o -MD -MP -MF .deps/libcommonpth_a-signal.Tpo -c -o libcommonpth_a-signal.o `test -f 'signal.c' || echo './'`signal.c
signal.c: In function ‘got_fatal_signal’:
signal.c:111:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void)write (2, "\n", 1 );
   ^~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:114:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     (void)write(2, s, strlen (s));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:115:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void)write (2, ": signal ", 9 );
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:118:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     (void) write (2, s, strlen(s) );
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:128:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
         (void)write (2, "?", 1);
         ^~~~~~~~~~~~~~~~~~~~~~~
signal.c:137:19: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
                   (void)write (2, &"0123456789"[value/i], 1);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
signal.c:145:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void)write (2, " caught ... exiting\n", 20);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

5:

gcc -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\"" -DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/usr/local/var\""        -I/usr/local/include -I/usr/local/include  -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -MT t-exechelp.o -MD -MP -MF .deps/t-exechelp.Tpo -c -o t-exechelp.o t-exechelp.c
t-exechelp.c: In function ‘test_close_all_fds’:
t-exechelp.c:96:3: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
   dup (1);
   ^~~~~~~
t-exechelp.c:97:3: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
   dup (1);
   ^~~~~~~
t-exechelp.c:99:3: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
   dup (1);
   ^~~~~~~
t-exechelp.c:140:9: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
         dup (1);
         ^~~~~~~
t-exechelp.c:147:11: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
           dup (1);
           ^~~~~~~

6:

gcc -DHAVE_CONFIG_H -I. -I../..  -I../../common -DLOCALEDIR=\"/usr/local/share/locale\" -DGNUPG_BINDIR="\"/usr/local/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\"" -DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/usr/local/var\""        -imacros scheme-config.h -I/usr/local/include -I/usr/local/include  -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -MT gpgscm-ffi.o -MD -MP -MF .deps/gpgscm-ffi.Tpo -c -o gpgscm-ffi.o `test -f 'ffi.c' || echo './'`ffi.c
ffi.c: In function ‘rl_gets’:
ffi.c:161:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
         fgets (line, max_size, stdin);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ffi.c: In function ‘do_file_equal’:
ffi.c:1044:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread (b_buf, 1, 1, b_stream);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Details

Version
2.2.3

Event Timeline

werner claimed this task.
werner added a subscriber: werner.

Please do not post warning. They are called warnings for a reason.