From: Paul Floyd Date: Sat, 14 Mar 2026 17:10:18 +0000 (+0100) Subject: Solaris: Fix GCC -Waddress warnings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfcd6efce82012efcb2cf97ec22165aba55f7209;p=thirdparty%2Fvalgrind.git Solaris: Fix GCC -Waddress warnings Also fix a warning in one regtest coming from setitimer. With XOPEN < 500 it uses an old prototype without a const 2nd argument. --- diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index b122d9627..c5058868e 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -1645,7 +1645,7 @@ static Bool handle_auxv_open(SyscallStatus *status, const HChar *filename, /* Opening /proc//auxv or /proc/self/auxv? */ VG_(sprintf)(name, "/proc/%d/auxv", VG_(getpid)()); - if (!VG_STREQ(filename, name) && !VG_STREQ(filename, "/proc/self/auxv")) + if ((VG_(strcmp)(filename, name)!=0) && (VG_(strcmp)(filename, "/proc/self/auxv")!=0)) return False; /* Allow to open the file only for reading. */ @@ -1682,7 +1682,7 @@ static Bool handle_psinfo_open(SyscallStatus *status, HChar name[VKI_PATH_MAX]; // large enough VG_(sprintf)(name, "/proc/%d/psinfo", VG_(getpid)()); - if (!VG_STREQ(filename, name) && !VG_STREQ(filename, "/proc/self/psinfo")) + if ((VG_(strcmp)(filename, name)!=0) && (VG_(strcmp)(filename, "/proc/self/psinfo")!=0)) return False; /* Use original arguments to open() or openat(). */ diff --git a/none/tests/bug492678.c b/none/tests/bug492678.c index 8c3689fc3..ddb00f9dc 100644 --- a/none/tests/bug492678.c +++ b/none/tests/bug492678.c @@ -1,3 +1,4 @@ +#define _XOPEN_SOURCE 500 #include #include #include