1 // Suppressions file for cppcheck. -*- conf -*-
3 // This includes suppressions for all of my projects, including files that
4 // aren't in rra-c-util, for ease of sharing between projects. The ones that
5 // don't apply to a particular project should hopefully be harmless.
7 // To determine the correct suppression to add for a new error, run cppcheck
8 // with the --xml flag and then add a suppression for the error id, file
11 // Copyright 2018-2020 Russ Allbery <eagle@eyrie.org>
13 // Copying and distribution of this file, with or without modification, are
14 // permitted in any medium without royalty provided the copyright notice and
15 // this notice are preserved. This file is offered as-is, without any
18 // SPDX-License-Identifier: FSFAP
20 // I like declaring variables at the top of a function rather than cluttering
21 // every if and loop body with declarations.
24 // strlen of a constant string is more maintainable code than hard-coding the
26 constArgument:tests/runtests.c:804
28 // False positive due to recursive function.
29 knownConditionTrueFalse:portable/getopt.c:146
31 // False positive since the string comes from a command-line define.
32 knownConditionTrueFalse:tests/tap/remctl.c:79
34 // Stored in the returned ai struct, but cppcheck can't see the assignment
35 // because of the struct sockaddr * cast.
36 memleak:portable/getaddrinfo.c:236
38 // Bug in cppcheck 1.89. The address of this variable is passed to a Windows
39 // function (albeit through a cast).
40 nullPointer:portable/winsock.c:61
42 // Setting the variable to NULL explicitly after deallocation.
43 redundantAssignment:tests/pam-util/options-t.c
45 // (remctl) Bug in cppcheck 1.89. The address of these variables are passed
47 uninitvar:php/php_remctl.c:119
48 uninitvar:php/php_remctl.c:123
49 uninitvar:php/php_remctl.c:315
50 uninitvar:php/php5_remctl.c:125
51 uninitvar:php/php5_remctl.c:129
52 uninitvar:php/php5_remctl.c:321
54 // (pam-krb5) cppcheck doesn't recognize the unused attribute on labels.
55 unusedLabel:module/auth.c:895