Skip to content

Commit f55055a

Browse files
committed
https://github.com/IOBYTE/cppcheck
resync pr
2 parents 17e08e1 + 9dbbd03 commit f55055a

86 files changed

Lines changed: 2803 additions & 816 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.gcno
33
*.gch
44
*.o
5+
*.a
56
*.pyc
67
/cppcheck
78
/cppcheck.exe

.selfcheck_suppressions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ templateInstantiation:test/testutils.cpp
6262

6363
naming-varname:externals/simplecpp/simplecpp.h
6464
naming-privateMemberVariable:externals/simplecpp/simplecpp.h
65+
# false positive; lambda captures its owner
66+
danglingLifetime:externals/simplecpp/simplecpp.h:505
6567

6668
# TODO: these warnings need to be addressed upstream
6769
uninitMemberVar:externals/tinyxml2/tinyxml2.h
@@ -79,4 +81,3 @@ useStlAlgorithm:externals/simplecpp/simplecpp.cpp
7981
funcArgNamesDifferentUnnamed:externals/simplecpp/simplecpp.h
8082
missingMemberCopy:externals/simplecpp/simplecpp.h
8183
shadowFunction:externals/simplecpp/simplecpp.h
82-
knownConditionTrueFalse:externals/simplecpp/simplecpp.cpp

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ Samuel Degrande
369369
Samuel Poláček
370370
Sandeep Dutta
371371
Savvas Etairidis
372+
Sayed Kaif
372373
Scott Ehlert
373374
Scott Furry
374375
Seafarix Ltd.

cfg/gtk.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
<define name="G_LIKELY(expr)" value="(expr)"/>
9393
<define name="G_UNLIKELY(expr)" value="(expr)"/>
9494
<define name="G_DEPRECATED" value="__attribute__((__deprecated__))"/>
95+
<define name="G_DEPRECATED_FOR(f)" value="__attribute__((__deprecated__(&quot;Use '&quot; #f &quot;' instead&quot;)))"/>
9596
<define name="G_STMT_START" value="do"/>
9697
<define name="G_STMT_END" value="while (0)"/>
9798
<define name="_G_TYPE_CIC(ip, gt, ct)" value="((ct*) ip)"/>
@@ -126,6 +127,7 @@
126127
<define name="g_try_new(struct_type, n_structs)" value="_G_NEW (struct_type, n_structs, try_malloc)"/>
127128
<define name="g_try_new0(struct_type, n_structs)" value="_G_NEW (struct_type, n_structs, try_malloc0)"/>
128129
<define name="g_try_renew(struct_type, mem, n_structs)" value="_G_RENEW (struct_type, mem, n_structs, try_realloc)"/>
130+
<define name="G_ENCODE_VERSION(major, minor)" value="((major) &lt;&lt; 16 | (minor) &lt;&lt; 8)"/>
129131
<define name="GTK_BUTTON(obj)" value="((GtkButton*)(obj))"/>
130132
<define name="GTK_BOX(obj)" value="((GtkBox*)(obj))"/>
131133
<define name="GTK_CONTAINER(obj)" value="((GtkContainer*)(obj))"/>
@@ -2251,6 +2253,7 @@
22512253
</function>
22522254
<!-- GList * g_list_find (GList *list, gconstpointer data); -->
22532255
<function name="g_list_find">
2256+
<pure/>
22542257
<leak-ignore/>
22552258
<noreturn>false</noreturn>
22562259
<returnValue type="GList"/>
@@ -5218,6 +5221,7 @@
52185221
<!-- gboolean g_str_has_prefix (const gchar* str, const gchar* prefix); -->
52195222
<!-- gboolean g_str_has_suffix (const gchar* str, const gchar* prefix); -->
52205223
<function name="g_str_has_prefix,g_str_has_suffix">
5224+
<pure/>
52215225
<leak-ignore/>
52225226
<noreturn>false</noreturn>
52235227
<returnValue type="gboolean"/>
@@ -6586,6 +6590,7 @@
65866590
</function>
65876591
<!-- gboolean g_error_matches(const GError *error, GQuark domain, gint code); -->
65886592
<function name="g_error_matches">
6593+
<pure/>
65896594
<noreturn>false</noreturn>
65906595
<returnValue type="gboolean"/>
65916596
<use-retval/>

cfg/qt.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@
410410
</arg>
411411
<arg nr="4" default="0">
412412
<not-uninit/>
413-
<not-bool/>
414413
</arg>
415414
<arg nr="5" default="0">
416415
<not-uninit/>

cmake/compilerDefinitions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ endif()
2020
if ((USE_LIBCXX AND CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
2121
if(CPPCHK_GLIBCXX_DEBUG AND CMAKE_BUILD_TYPE STREQUAL "Debug")
2222
# TODO: determine proper version for AppleClang - current value is based on the oldest version avaialble in CI
23-
if((CMAKE_CXX_COMPILER_ID STREQUALS "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18) OR
23+
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18) OR
2424
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17))
2525
add_definitions(-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG)
2626
else()

0 commit comments

Comments
 (0)