diff --git a/cppcheck-gcc11.patch b/cppcheck-gcc11.patch new file mode 100644 index 0000000..a9b127a --- /dev/null +++ b/cppcheck-gcc11.patch @@ -0,0 +1,24 @@ +diff --git a/lib/programmemory.cpp b/lib/programmemory.cpp +index 6b0e2d8..785c9cf 100644 +--- a/lib/programmemory.cpp ++++ b/lib/programmemory.cpp +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + void ProgramMemory::setValue(nonneg int varid, const ValueFlow::Value &value) + { +diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp +index 4d378d5..ced44ab 100644 +--- a/test/testsymboldatabase.cpp ++++ b/test/testsymboldatabase.cpp +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + struct InternalError; + diff --git a/cppcheck.spec b/cppcheck.spec index bf0876f..22dc8c7 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -19,6 +19,8 @@ Patch3: cppcheck-2.2-exprengine.patch # Look for Qt online-help file also in FILESDIR # https://github.com/danmar/cppcheck/commit/df9f6f3 Patch4: cppcheck-2.2-online-help.patch +# Fix for missing #include with gcc-11 +Patch5: cppcheck-gcc11.patch BuildRequires: gcc-c++ BuildRequires: pcre-devel @@ -66,6 +68,7 @@ from xml files first generated using cppcheck. %patch2 -p1 -b .python3 %patch3 -p1 -b .exprengine %patch4 -p1 -b .online-help +%patch5 -p1 -b .gcc11 # Make sure bundled tinyxml is not used rm -r externals/tinyxml # Generate the Qt online-help file