Skip to content

Conversation

gpalino
Copy link
Contributor

@gpalino gpalino commented Sep 24, 2025

Removed this warning:
src/unwind/unwind.hpp:10:10: warning: 'WIN32_LEAN_AND_MEAN' redefined
Similar background like in #186

@gpalino
Copy link
Contributor Author

gpalino commented Sep 24, 2025

I tried to fix also this warning under MSYS2+MINGW64 platform, gcc version 15.1.0:

/d/bin/msys64/mingw64/bin/g++.exe -DASIO_STANDALONE -DCPPTRACE_DEMANGLE_WITH_CXXABI -DCPPTRACE_GET_SYMBOLS_WITH_DBGHELP -DCPPTRACE_GET_SYMBOLS_WITH_LIBDWARF -DCPPTRACE_HAS_CXX_EXCEPTION_TYPE -DCPPTRACE_STATIC_DEFINE -DCPPTRACE_UNWIND_WITH_DBGHELP -DGLBINDING_STATIC_DEFINE -DHAS_ATTRIBUTE_PACKED -DLIBDWARF_STATIC -DMINGW_HAS_SECURE_API -DNGHTTP2_STATICLIB -DNOMINMAX -DPIC -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0601 -D__STDC_FORMAT_MACROS -D__USE_MINGW_ANSI_STDIO -ID:/code/widelands/build/_deps/cpptrace-src/src -ID:/code/widelands/build/_deps/libdwarf-src/src/lib/libdwarf -isystem D:/code/widelands/build/_deps/cpptrace-src/include -isystem D:/code/widelands/build/_deps/cpptrace-build/include -O2 -g -DNDEBUG -fvisibility=hidden -fno-keep-inline-dllexport -Wall -Wextra -Werror=return-type -Wundef -Wuseless-cast -Wmaybe-uninitialized -MD -MT _deps/cpptrace-build/CMakeFiles/cpptrace-lib.dir/src/unwind/unwind_with_dbghelp.cpp.obj -MF _deps\cpptrace-build\CMakeFiles\cpptrace-lib.dir\src\unwind\unwind_with_dbghelp.cpp.obj.d -o _deps/cpptrace-build/CMakeFiles/cpptrace-lib.dir/src/unwind/unwind_with_dbghelp.cpp.obj -c D:/code/widelands/build/_deps/cpptrace-src/src/unwind/unwind_with_dbghelp.cpp
D:/code/widelands/build/_deps/cpptrace-src/src/unwind/unwind_with_dbghelp.cpp: In function 'std::vector<long long unsigned int> cpptrace::v1::detail::capture_frames(std::size_t, std::size_t, EXCEPTION_POINTERS*)':
D:/code/widelands/build/_deps/cpptrace-src/src/unwind/unwind_with_dbghelp.cpp:28:21: warning: argument 'skip' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
   28 |         std::size_t skip,
      |         ~~~~~~~~~~~~^~~~

With this patch: warn2.patch
But when g++ gets parameter -std=gnu++20, there starts warning: 'volatile'-qualified parameter is deprecated [-Wvolatile]
So giving up solving this second warning.

Copy link
Owner

@jeremy-rifkin jeremy-rifkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jeremy-rifkin jeremy-rifkin merged commit 99ec0fb into jeremy-rifkin:dev Sep 24, 2025
106 checks passed
@jeremy-rifkin
Copy link
Owner

Regarding the second error, I don't see how that parameter could be clobbered. Using volatile to try to suppress the warning wouldn't be a good solution, though. A #pragma GCC diagnostic ignored might be appropriate here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants