Summary: | Fix bug472219.c compile failure with Clang 16 | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | fanquake |
Component: | memcheck | Assignee: | Paul Floyd <pjfloyd> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mark, pjfloyd |
Priority: | NOR | ||
Version First Reported In: | 3.22 GIT | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | memcheck-fix-bug472219.c-compile-failure-under-Clang.patch |
Description
fanquake
2023-08-21 15:33:08 UTC
Seeing the same warning (not an error) with gcc 13.2.1: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I../../coregrind -I../../include -I../../VEX/pub -I../../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -DVGA_SEC_x86=1 -DVGP_SEC_amd64_linux=1 -Winline -Wall -Wshadow -Wno-long-long -g -fno-stack-protector -m64 -Wno-uninitialized -MT bug472219-bug472219.o -MD -MP -MF .deps/bug472219-bug472219.Tpo -c -o bug472219-bug472219.o `test -f 'bug472219.c' || echo './'`bug472219.c bug472219.c: In function ‘main’: bug472219.c:14:4: warning: implicit declaration of function ‘ppoll’; did you mean ‘poll’? [-Wimplicit-function-declaration] 14 | ppoll(fds, 2, &timeout, NULL); | ^~~~~ | poll Bah. "It worked on my machine". STANDARDS The poll() function conforms to IEEE Std 1003.1-2001 ("POSIX.1"). The ppoll() is not specified by POSIX. The POLLRDHUP flag is not specified by POSIX, but is compatible with Linux and illumos. I should have added that the proposed fix to #define _GNU_SOURCE before the #include <poll.h> works to get rid of the warning. commit bdd5f0bad19eb9544511a9c40241901d34f16781 (HEAD -> master, origin/master, origin/HEAD) Author: Paul Floyd <pjfloyd@wanadoo.fr> Date: Tue Aug 22 21:35:00 2023 +0200 Bug 473604 - Fix bug472219.c compile failure with Clang 16 |