* [PATCH] testsuite: analyzer: Fix fd-glibc-byte-stream-connection-server.c on Solaris [PR107750]
@ 2024-05-14 12:32 Rainer Orth
2024-05-14 14:10 ` David Malcolm
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2024-05-14 12:32 UTC (permalink / raw)
To: gcc-patches; +Cc: David Malcolm
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]
gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c currently FAILs
on Solaris:
FAIL: gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c (test for excess errors)
Excess errors:
/vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c:91:3: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
Solaris <sys/select.h> has
#define FD_ZERO(__p) (void) memset((__p), 0, sizeof (*(__p)))
but no declaration of memset. While one can argue that this should be
fixed, it's easy enough to just include <string.h> instead, which is
what this patch does.
Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu.
Ok for trunk?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2024-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc/testsuite:
PR analyzer/107750
* gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c:
Include <string.h>.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-testsuite-analyzer-fd-glibc-byte-stream-connection-server.patch --]
[-- Type: text/x-patch, Size: 650 bytes --]
# HG changeset patch
# Parent 4d8ceef2997b0a0ff7a4b4df140f9f864e923eb4
testsuite: analyzer: Fix fd-glibc-byte-stream-connection-server.c on Solaris [PR107750]
diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c
--- a/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c
+++ b/gcc/testsuite/gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#if __has_include(<sys/select.h>)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] testsuite: analyzer: Fix fd-glibc-byte-stream-connection-server.c on Solaris [PR107750]
2024-05-14 12:32 [PATCH] testsuite: analyzer: Fix fd-glibc-byte-stream-connection-server.c on Solaris [PR107750] Rainer Orth
@ 2024-05-14 14:10 ` David Malcolm
0 siblings, 0 replies; 2+ messages in thread
From: David Malcolm @ 2024-05-14 14:10 UTC (permalink / raw)
To: Rainer Orth, gcc-patches
On Tue, 2024-05-14 at 14:32 +0200, Rainer Orth wrote:
> gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c currently
> FAILs
> on Solaris:
>
> FAIL: gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c (test
> for excess errors)
>
> Excess errors:
> /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/analyzer/fd-glibc-
> byte-stream-connection-server.c:91:3: error: implicit declaration of
> function 'memset' [-Wimplicit-function-declaration]
>
> Solaris <sys/select.h> has
>
> #define FD_ZERO(__p) (void) memset((__p), 0, sizeof (*(__p)))
>
> but no declaration of memset. While one can argue that this should
> be
> fixed, it's easy enough to just include <string.h> instead, which is
> what this patch does.
>
> Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu.
>
> Ok for trunk?
Yes, thanks.
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-14 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-14 12:32 [PATCH] testsuite: analyzer: Fix fd-glibc-byte-stream-connection-server.c on Solaris [PR107750] Rainer Orth
2024-05-14 14:10 ` David Malcolm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).