]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
backtrace: Fix compiler warning on Windows
authorTobias Brunner <tobias@strongswan.org>
Fri, 12 Jul 2024 08:24:35 +0000 (10:24 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Jul 2024 09:48:03 +0000 (11:48 +0200)
This change avoids a "variable 'got' might be clobbered by 'longjmp' or
'vfork'" warning with -Wextra.

src/libstrongswan/utils/backtrace.c

index f2631f3945a64e93d7ff67dfaa6a7e19af748801..83700ef351223f47611e8eaf2cff9124606ef9f0 100644 (file)
@@ -870,7 +870,7 @@ static inline int backtrace_win(void **frames, int count)
        HANDLE process, thread;
        DWORD machine;
        CONTEXT context;
-       int got = 0;
+       volatile int got = 0;
 
        memset(&frame, 0, sizeof(frame));
        memset(&context, 0, sizeof(context));