public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: suppress a warning generated with w32api >= 12.0.0
@ 2024-06-16 14:31 Jon Turney
0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2024-06-16 14:31 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7e3c833592b282355a57dd34459b152e4e078d19
commit 7e3c833592b282355a57dd34459b152e4e078d19
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date: Fri Jun 7 17:29:10 2024 +0100
Cygwin: suppress a warning generated with w32api >= 12.0.0
w32api 12.0.0 adds the returns_twice attribute to RtlCaptureContext().
There's some data-flow interaction with using it inside a while loop
which causes a maybe-uninitialized warning.
../../../../winsup/cygwin/exceptions.cc: In member function 'int _cygtls::call_signal_handler()':
../../../../winsup/cygwin/exceptions.cc:1720:33: error: '<anonymous>' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Diff:
---
winsup/cygwin/exceptions.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index a2a6f9d4c..28d0431d5 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1717,7 +1717,10 @@ _cygtls::call_signal_handler ()
context, unwind to the caller and in case we're called
from sigdelayed, fix the instruction pointer accordingly. */
context.uc_mcontext.ctxflags = CONTEXT_FULL;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
RtlCaptureContext ((PCONTEXT) &context.uc_mcontext);
+#pragma GCC diagnostic pop
__unwind_single_frame ((PCONTEXT) &context.uc_mcontext);
if (stackptr > stack)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-16 14:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-16 14:31 [newlib-cygwin/main] Cygwin: suppress a warning generated with w32api >= 12.0.0 Jon Turney
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).