Skip to content

Commit 45944b9

Browse files
Merge branch 'cppcheck-opensource:main' into chr_15144
2 parents b2df036 + ffe7e9b commit 45944b9

237 files changed

Lines changed: 20464 additions & 3024 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.

‎.clang-tidy‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Checks: >
1818
-objc-*,
1919
-openmp-*,
2020
-zircon-*,
21+
cppcoreguidelines-avoid-const-or-ref-data-members,
2122
cppcoreguidelines-pro-type-static-cast-downcast,
2223
cppcoreguidelines-rvalue-reference-param-not-moved,
2324
google-explicit-constructor,

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
uses: github/codeql-action/init@v4
4343
with:
4444
languages: ${{ matrix.language }}
45+
config: |
46+
paths-ignore:
47+
- gui/manualtest
4548
4649
- name: Build cppcheck
4750
if: matrix.language == 'cpp'

‎AUTHORS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Ahti Legonkov
1111
Akhilesh Nema
1212
Akio Idehara
1313
Albert Aribaud
14+
Alvin Che-Chia Chang
1415
Aleksandr Pikalev
1516
Aleksey Palazhchenko
1617
Alexander Alekseev

‎Makefile‎

Lines changed: 137 additions & 133 deletions
Large diffs are not rendered by default.

‎addons/threadsafety.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
'race:stdin',
9292
'race:stdout',
9393
'race:streams',
94-
'race:strerror',
9594
'race:strsignal',
9695
'race:strtok',
9796
'race:tmbuf',
@@ -261,7 +260,6 @@
261260
'siginterrupt',
262261
'sleep',
263262
'srand48',
264-
'strerror',
265263
'strsignal',
266264
'strtok',
267265
'tmpnam',

‎cfg/gnu.cfg‎

Lines changed: 319 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,322 @@
168168
<arg nr="variadic" direction="in">
169169
<not-uninit/>
170170
</arg>
171+
</function>
172+
<!-- https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html -->
173+
<!-- bool __builtin_add_overflow (type1 a, type2 b, type3 *res) -->
174+
<function name="__builtin_add_overflow">
175+
<noreturn>false</noreturn>
176+
<returnValue type="bool"/>
177+
<leak-ignore/>
178+
<arg nr="1" direction="in">
179+
<not-uninit/>
180+
</arg>
181+
<arg nr="2" direction="in">
182+
<not-uninit/>
183+
</arg>
184+
<arg nr="3" direction="out" indirect="1">
185+
<not-null/>
186+
</arg>
187+
</function>
188+
<!-- bool __builtin_sadd_overflow (int a, int b, int *res) -->
189+
<function name="__builtin_sadd_overflow">
190+
<noreturn>false</noreturn>
191+
<returnValue type="bool"/>
192+
<leak-ignore/>
193+
<arg nr="1" direction="in">
194+
<not-uninit/>
195+
</arg>
196+
<arg nr="2" direction="in">
197+
<not-uninit/>
198+
</arg>
199+
<arg nr="3" direction="out" indirect="1">
200+
<not-null/>
201+
</arg>
202+
</function>
203+
<!-- bool __builtin_saddl_overflow (long int a, long int b, long int *res) -->
204+
<function name="__builtin_saddl_overflow">
205+
<noreturn>false</noreturn>
206+
<returnValue type="bool"/>
207+
<leak-ignore/>
208+
<arg nr="1" direction="in">
209+
<not-uninit/>
210+
</arg>
211+
<arg nr="2" direction="in">
212+
<not-uninit/>
213+
</arg>
214+
<arg nr="3" direction="out" indirect="1">
215+
<not-null/>
216+
</arg>
217+
</function>
218+
<!-- bool __builtin_saddll_overflow (long long int a, long long int b, long long int *res) -->
219+
<function name="__builtin_saddll_overflow">
220+
<noreturn>false</noreturn>
221+
<returnValue type="bool"/>
222+
<leak-ignore/>
223+
<arg nr="1" direction="in">
224+
<not-uninit/>
225+
</arg>
226+
<arg nr="2" direction="in">
227+
<not-uninit/>
228+
</arg>
229+
<arg nr="3" direction="out" indirect="1">
230+
<not-null/>
231+
</arg>
232+
</function>
233+
<!-- bool __builtin_uadd_overflow (unsigned int a, unsigned int b, unsigned int *res) -->
234+
<function name="__builtin_uadd_overflow">
235+
<noreturn>false</noreturn>
236+
<returnValue type="bool"/>
237+
<leak-ignore/>
238+
<arg nr="1" direction="in">
239+
<not-uninit/>
240+
</arg>
241+
<arg nr="2" direction="in">
242+
<not-uninit/>
243+
</arg>
244+
<arg nr="3" direction="out" indirect="1">
245+
<not-null/>
246+
</arg>
247+
</function>
248+
<!-- bool __builtin_uaddl_overflow (unsigned long int a, unsigned long int b, unsigned long int *res) -->
249+
<function name="__builtin_uaddl_overflow">
250+
<noreturn>false</noreturn>
251+
<returnValue type="bool"/>
252+
<leak-ignore/>
253+
<arg nr="1" direction="in">
254+
<not-uninit/>
255+
</arg>
256+
<arg nr="2" direction="in">
257+
<not-uninit/>
258+
</arg>
259+
<arg nr="3" direction="out" indirect="1">
260+
<not-null/>
261+
</arg>
262+
</function>
263+
<!-- bool __builtin_uaddll_overflow (unsigned long long int a, unsigned long long int b, unsigned long long int *res) -->
264+
<function name="__builtin_uaddll_overflow">
265+
<noreturn>false</noreturn>
266+
<returnValue type="bool"/>
267+
<leak-ignore/>
268+
<arg nr="1" direction="in">
269+
<not-uninit/>
270+
</arg>
271+
<arg nr="2" direction="in">
272+
<not-uninit/>
273+
</arg>
274+
<arg nr="3" direction="out" indirect="1">
275+
<not-null/>
276+
</arg>
277+
</function>
278+
<!-- bool __builtin_sub_overflow (type1 a, type2 b, type3 *res) -->
279+
<function name="__builtin_sub_overflow">
280+
<noreturn>false</noreturn>
281+
<returnValue type="bool"/>
282+
<leak-ignore/>
283+
<arg nr="1" direction="in">
284+
<not-uninit/>
285+
</arg>
286+
<arg nr="2" direction="in">
287+
<not-uninit/>
288+
</arg>
289+
<arg nr="3" direction="out" indirect="1">
290+
<not-null/>
291+
</arg>
292+
</function>
293+
<!-- bool __builtin_ssub_overflow (int a, int b, int *res) -->
294+
<function name="__builtin_ssub_overflow">
295+
<noreturn>false</noreturn>
296+
<returnValue type="bool"/>
297+
<leak-ignore/>
298+
<arg nr="1" direction="in">
299+
<not-uninit/>
300+
</arg>
301+
<arg nr="2" direction="in">
302+
<not-uninit/>
303+
</arg>
304+
<arg nr="3" direction="out" indirect="1">
305+
<not-null/>
306+
</arg>
307+
</function>
308+
<!-- bool __builtin_ssubl_overflow (long int a, long int b, long int *res) -->
309+
<function name="__builtin_ssubl_overflow">
310+
<noreturn>false</noreturn>
311+
<returnValue type="bool"/>
312+
<leak-ignore/>
313+
<arg nr="1" direction="in">
314+
<not-uninit/>
315+
</arg>
316+
<arg nr="2" direction="in">
317+
<not-uninit/>
318+
</arg>
319+
<arg nr="3" direction="out" indirect="1">
320+
<not-null/>
321+
</arg>
322+
</function>
323+
<!-- bool __builtin_ssubll_overflow (long long int a, long long int b, long long int *res) -->
324+
<function name="__builtin_ssubll_overflow">
325+
<noreturn>false</noreturn>
326+
<returnValue type="bool"/>
327+
<leak-ignore/>
328+
<arg nr="1" direction="in">
329+
<not-uninit/>
330+
</arg>
331+
<arg nr="2" direction="in">
332+
<not-uninit/>
333+
</arg>
334+
<arg nr="3" direction="out" indirect="1">
335+
<not-null/>
336+
</arg>
337+
</function>
338+
<!-- bool __builtin_usub_overflow (unsigned int a, unsigned int b, unsigned int *res) -->
339+
<function name="__builtin_usub_overflow">
340+
<noreturn>false</noreturn>
341+
<returnValue type="bool"/>
342+
<leak-ignore/>
343+
<arg nr="1" direction="in">
344+
<not-uninit/>
345+
</arg>
346+
<arg nr="2" direction="in">
347+
<not-uninit/>
348+
</arg>
349+
<arg nr="3" direction="out" indirect="1">
350+
<not-null/>
351+
</arg>
352+
</function>
353+
<!-- bool __builtin_usubl_overflow (unsigned long int a, unsigned long int b, unsigned long int *res) -->
354+
<function name="__builtin_usubl_overflow">
355+
<noreturn>false</noreturn>
356+
<returnValue type="bool"/>
357+
<leak-ignore/>
358+
<arg nr="1" direction="in">
359+
<not-uninit/>
360+
</arg>
361+
<arg nr="2" direction="in">
362+
<not-uninit/>
363+
</arg>
364+
<arg nr="3" direction="out" indirect="1">
365+
<not-null/>
366+
</arg>
367+
</function>
368+
<!-- bool __builtin_usubll_overflow (unsigned long long int a, unsigned long long int b, unsigned long long int *res) -->
369+
<function name="__builtin_usubll_overflow">
370+
<noreturn>false</noreturn>
371+
<returnValue type="bool"/>
372+
<leak-ignore/>
373+
<arg nr="1" direction="in">
374+
<not-uninit/>
375+
</arg>
376+
<arg nr="2" direction="in">
377+
<not-uninit/>
378+
</arg>
379+
<arg nr="3" direction="out" indirect="1">
380+
<not-null/>
381+
</arg>
382+
</function>
383+
<!-- bool __builtin_mul_overflow (type1 a, type2 b, type3 *res) -->
384+
<function name="__builtin_mul_overflow">
385+
<noreturn>false</noreturn>
386+
<returnValue type="bool"/>
387+
<leak-ignore/>
388+
<arg nr="1" direction="in">
389+
<not-uninit/>
390+
</arg>
391+
<arg nr="2" direction="in">
392+
<not-uninit/>
393+
</arg>
394+
<arg nr="3" direction="out" indirect="1">
395+
<not-null/>
396+
</arg>
397+
</function>
398+
<!-- bool __builtin_smul_overflow (int a, int b, int *res) -->
399+
<function name="__builtin_smul_overflow">
400+
<noreturn>false</noreturn>
401+
<returnValue type="bool"/>
402+
<leak-ignore/>
403+
<arg nr="1" direction="in">
404+
<not-uninit/>
405+
</arg>
406+
<arg nr="2" direction="in">
407+
<not-uninit/>
408+
</arg>
409+
<arg nr="3" direction="out" indirect="1">
410+
<not-null/>
411+
</arg>
412+
</function>
413+
<!-- bool __builtin_smull_overflow (long int a, long int b, long int *res) -->
414+
<function name="__builtin_smull_overflow">
415+
<noreturn>false</noreturn>
416+
<returnValue type="bool"/>
417+
<leak-ignore/>
418+
<arg nr="1" direction="in">
419+
<not-uninit/>
420+
</arg>
421+
<arg nr="2" direction="in">
422+
<not-uninit/>
423+
</arg>
424+
<arg nr="3" direction="out" indirect="1">
425+
<not-null/>
426+
</arg>
427+
</function>
428+
<!-- bool __builtin_smulll_overflow (long long int a, long long int b, long long int *res) -->
429+
<function name="__builtin_smulll_overflow">
430+
<noreturn>false</noreturn>
431+
<returnValue type="bool"/>
432+
<leak-ignore/>
433+
<arg nr="1" direction="in">
434+
<not-uninit/>
435+
</arg>
436+
<arg nr="2" direction="in">
437+
<not-uninit/>
438+
</arg>
439+
<arg nr="3" direction="out" indirect="1">
440+
<not-null/>
441+
</arg>
442+
</function>
443+
<!-- bool __builtin_umul_overflow (unsigned int a, unsigned int b, unsigned int *res) -->
444+
<function name="__builtin_umul_overflow">
445+
<noreturn>false</noreturn>
446+
<returnValue type="bool"/>
447+
<leak-ignore/>
448+
<arg nr="1" direction="in">
449+
<not-uninit/>
450+
</arg>
451+
<arg nr="2" direction="in">
452+
<not-uninit/>
453+
</arg>
454+
<arg nr="3" direction="out" indirect="1">
455+
<not-null/>
456+
</arg>
457+
</function>
458+
<!-- bool __builtin_umull_overflow (unsigned long int a, unsigned long int b, unsigned long int *res) -->
459+
<function name="__builtin_umull_overflow">
460+
<noreturn>false</noreturn>
461+
<returnValue type="bool"/>
462+
<leak-ignore/>
463+
<arg nr="1" direction="in">
464+
<not-uninit/>
465+
</arg>
466+
<arg nr="2" direction="in">
467+
<not-uninit/>
468+
</arg>
469+
<arg nr="3" direction="out" indirect="1">
470+
<not-null/>
471+
</arg>
472+
</function>
473+
<!-- bool __builtin_umulll_overflow (unsigned long long int a, unsigned long long int b, unsigned long long int *res) -->
474+
<function name="__builtin_umulll_overflow">
475+
<noreturn>false</noreturn>
476+
<returnValue type="bool"/>
477+
<leak-ignore/>
478+
<arg nr="1" direction="in">
479+
<not-uninit/>
480+
</arg>
481+
<arg nr="2" direction="in">
482+
<not-uninit/>
483+
</arg>
484+
<arg nr="3" direction="out" indirect="1">
485+
<not-null/>
486+
</arg>
171487
</function>
172488
<!-- https://man7.org/linux/man-pages/man3/getenv.3.html -->
173489
<!-- char * secure_getenv(const char *name); -->
@@ -334,7 +650,7 @@
334650
<not-bool/>
335651
</arg>
336652
</function>
337-
<!-- https://man7.org/linux/man-pages/man3/mempcpy.3.html-->
653+
<!-- https://man7.org/linux/man-pages/man3/wmempcpy.3.html -->
338654
<!-- wchar_t *wmempcpy(wchar_t *restrict dest, const wchar_t *restrict src, size_t n);-->
339655
<function name="wmempcpy">
340656
<returnValue type="wchar_t *"/>
@@ -343,12 +659,12 @@
343659
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" size-arg="3"/>
344660
<arg nr="1" direction="out">
345661
<not-null/>
346-
<minsize type="argvalue" arg="3"/>
662+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
347663
</arg>
348664
<arg nr="2" direction="in">
349665
<not-null/>
350666
<not-uninit/>
351-
<minsize type="argvalue" arg="3"/>
667+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
352668
</arg>
353669
<arg nr="3" direction="in">
354670
<not-uninit/>

0 commit comments

Comments
 (0)