1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2025-06-30 14:41:50 +03:00

Patch two Cppcheck bugs for upcoming GCC 13

Cppcheck does not compile with GCC 13 without these fixes, see:
https://gcc.gnu.org/gcc-13/porting_to.html
This commit is contained in:
Christopher Wellons
2023-04-26 11:13:26 -04:00
parent 5b2e053bd1
commit 983d4718a2

18
src/cppcheck-gcc13.patch Normal file
View File

@ -0,0 +1,18 @@
GCC 13 has stricter allocator checks:
https://gcc.gnu.org/gcc-13/porting_to.html
Also, libstdc++ no longer leaks stdint.h definitions.
--- a/lib/mathlib.cpp
+++ b/lib/mathlib.cpp
@@ -25,2 +25,3 @@
#include <cmath>
+#include <cstdint>
#include <cstdlib>
--- a/lib/smallvector.h
+++ b/lib/smallvector.h
@@ -43,2 +43,5 @@
{}
+
+ template<class U> TaggedAllocator(const TaggedAllocator<U, N>);
+ template<class U> struct rebind { using other = TaggedAllocator<U, N>; };
};