Skip to content

Fix EDG and MinGW (and also GCC) warnings

For the current master of libxml2, there are some warnings produced by several compilers, if libxml2 is built with Release build type (but not with Debug type). The affected comiplers are MinGW 7.3 (based on GCC, so same issues are noticed on GCC 7.3 on Linux too) and LCC 1.26 (based on EDG). I suspect more strict warning options and compiler optimizations that may generate, like -Warray-bounds or -Wmaybe-uninitialized in the places where compiler is not perfectly sure about it.

In addition, with MinGW with Windows Threads, InitOnceExecuteOnce() may be unavailable in header file (so implicit function declaration warning may be issued). For it to be available, _WIN32_WINNT should be defined as 0x0600 (or higher, but 0x0600 seems to be enough for libxml2) regardless of its default value.

This MR fixes these issues, so Release build with any of these compilers is warningless (and Debug is tested to be warningless as well, as it was before).

Merge request reports

Loading