From 574bfad1c095f2c3deb6c1ff463d06df71404280 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 12 Jul 2024 10:24:35 +0200 Subject: [PATCH] backtrace: Fix compiler warning on Windows This change avoids a "variable 'got' might be clobbered by 'longjmp' or 'vfork'" warning with -Wextra. --- src/libstrongswan/utils/backtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstrongswan/utils/backtrace.c b/src/libstrongswan/utils/backtrace.c index f2631f394..83700ef35 100644 --- a/src/libstrongswan/utils/backtrace.c +++ b/src/libstrongswan/utils/backtrace.c @@ -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));