From: Corinna Vinschen Date: Wed, 7 Dec 2022 20:17:10 +0000 (+0100) Subject: Cygwin: add missing pragma X-Git-Tag: newlib-4.3.0~116 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=792b1c6a6d4acee79e1287369498f6ad8e75c1bf;p=newlib-cygwin.git Cygwin: add missing pragma Add missing "#pragma GCC diagnostic push" to the pragma bracket guarding the srandom call. Signed-off-by: Corinna Vinschen --- diff --git a/winsup/cygwin/random.cc b/winsup/cygwin/random.cc index 163fc040c..6dd7e1d8d 100644 --- a/winsup/cygwin/random.cc +++ b/winsup/cygwin/random.cc @@ -307,6 +307,7 @@ srandomdev() gettimeofday(&tv, NULL); /* Avoid a compiler warning when we really want to get at the junk in an uninitialized variable. */ +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); #pragma GCC diagnostic pop