Wireshark mailing list archives
Re: Compilation failure - privileges.c: In function 'relinquish_special_privs_perm' - ignoring return value of 'setresgid', declared with attribute warn_unused_result [-Werror=unused-result]
From: Kaul <mykaul () gmail com>
Date: Tue, 21 Aug 2012 08:43:46 +0300
On Mon, Aug 20, 2012 at 11:11 PM, Evan Huus <eapache () gmail com> wrote:
On Mon, Aug 20, 2012 at 3:49 PM, Kaul <mykaul () gmail com> wrote:Recently (~2 days or so ago?), I've failed to compile wireshark, onF17/x64:libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I./.. -DINET6 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES "-D_U_=__attribute__((unused))" -D_FORTIFY_SOURCE=2 -I/usr/local/include -DPLUGIN_DIR=\"/usr/local/lib/wireshark/plugins/1.9.0\" -Werror -g -O2-Wall-W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign -Warray-bounds -Wcast-align -Wformat-security -Wold-style-definition -Wno-error=unused-but-set-variable -fexcess-precision=fast -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15-MTprivileges.lo -MD -MP -MF .deps/privileges.Tpo -c privileges.c -fPIC-DPIC-o .libs/privileges.o privileges.c: In function 'relinquish_special_privs_perm': privileges.c:275:12: error: ignoring return value of 'setresgid',declaredwith attribute warn_unused_result [-Werror=unused-result] privileges.c:282:12: error: ignoring return value of 'setresuid',declaredwith attribute warn_unused_result [-Werror=unused-result] cc1: all warnings being treated as errors If it were git, I'm sure I could easily use 'git bisect' and find theissue.Without it, I'm really unsure - as the last change to this file tookplacesome time ago.We do have a read-only git mirror at [1].
OK, might switch to it. Is it reliable?
If the last change to the file happened a while ago (presumably long before the issue started appearing) then it's likely your toolchain changed recently. Did you install a gcc or libc update in the last couple of days?
Perhaps - Aug 16 12:42:10 Updated: glibc-common-2.15-54.fc17.x86_64 Aug 16 12:42:12 Updated: glibc-2.15-54.fc17.x86_64 Aug 16 12:42:13 Updated: glibc-headers-2.15-54.fc17.x86_64 Aug 16 12:42:14 Updated: glibc-devel-2.15-54.fc17.x86_64 Aug 16 12:42:18 Updated: glibc-2.15-54.fc17.i686 Aug 19 08:39:11 Updated: glibc-2.15-56.fc17.x86_64 Aug 19 08:39:35 Updated: glibc-common-2.15-56.fc17.x86_64 Aug 19 08:39:47 Updated: glibc-headers-2.15-56.fc17.x86_64 Aug 19 08:41:05 Updated: glibc-devel-2.15-56.fc17.x86_64 Aug 19 08:41:20 Updated: glibc-2.15-56.fc17.i686
Not that it isn't our fault (assuming the warning isn't a false positive), it's just likely that only the most recent gcc/libc toolchain will warn on the problem.
As a workaround, added --disable-warnings-as-errors to my config options. Thanks, Y.
Thanks for the report, Evan [1] http://code.wireshark.org/git/wireshark ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org ?subject=unsubscribe
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Compilation failure - privileges.c: In function 'relinquish_special_privs_perm' - ignoring return value of 'setresgid', declared with attribute warn_unused_result [-Werror=unused-result] Kaul (Aug 20)
- Re: Compilation failure - privileges.c: In function 'relinquish_special_privs_perm' - ignoring return value of 'setresgid', declared with attribute warn_unused_result [-Werror=unused-result] Evan Huus (Aug 20)
- Re: Compilation failure - privileges.c: In function 'relinquish_special_privs_perm' - ignoring return value of 'setresgid', declared with attribute warn_unused_result [-Werror=unused-result] Kaul (Aug 20)
- Re: Compilation failure - privileges.c: In function 'relinquish_special_privs_perm' - ignoring return value of 'setresgid', declared with attribute warn_unused_result [-Werror=unused-result] Guy Harris (Aug 20)
- Re: Compilation failure - privileges.c: In function 'relinquish_special_privs_perm' - ignoring return value of 'setresgid', declared with attribute warn_unused_result [-Werror=unused-result] Evan Huus (Aug 20)