From: Tobias Brunner Date: Fri, 12 Jul 2024 08:24:35 +0000 (+0200) Subject: backtrace: Fix compiler warning on Windows X-Git-Tag: android-2.5.2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=574bfad1c095f2c3deb6c1ff463d06df71404280;p=thirdparty%2Fstrongswan.git backtrace: Fix compiler warning on Windows This change avoids a "variable 'got' might be clobbered by 'longjmp' or 'vfork'" warning with -Wextra. --- diff --git a/src/libstrongswan/utils/backtrace.c b/src/libstrongswan/utils/backtrace.c index f2631f3945..83700ef351 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));