]> eyrie.org Git - kerberos/krb5-strength.git/blob - tests/data/cppcheck.supp
New upstream version 3.3
[kerberos/krb5-strength.git] / tests / data / cppcheck.supp
1 // Suppressions file for cppcheck.
2 //
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.
6 //
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
9 // location, and line.
10 //
11 // Copyright 2018-2023 Russ Allbery <eagle@eyrie.org>
12 //
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
16 // warranty.
17 //
18 // SPDX-License-Identifier: FSFAP
19
20 // I like declaring variables at the top of a function rather than cluttering
21 // every if and loop body with declarations.
22 variableScope
23
24 // strlen of a constant string is more maintainable code than hard-coding the
25 // string length.
26 constArgument:tests/runtests.c:804
27
28 // False positive due to recursive function.
29 knownConditionTrueFalse:portable/getopt.c:146
30
31 // Bug in cppcheck 2.3.  cppcheck can't see the assignment because of the
32 // void * cast.
33 knownConditionTrueFalse:portable/k_haspag.c:61
34
35 // False positive since the string comes from a command-line define.
36 knownConditionTrueFalse:tests/tap/process.c:415
37 knownConditionTrueFalse:tests/tap/remctl.c:79
38
39 // Stored in the returned ai struct, but cppcheck can't see the assignment
40 // because of the struct sockaddr * cast.
41 memleak:portable/getaddrinfo.c:236
42
43 // Bug in cppcheck 1.89 (fixed in 2.3).  The address of this variable is
44 // passed to a Windows function (albeit through a cast).
45 nullPointer:portable/winsock.c:62
46
47 // Bug in cppcheck 2.3.
48 nullPointerRedundantCheck:portable/krb5-profile.c:61
49
50 // Bug in cppcheck 2.3.
51 nullPointerRedundantCheck:portable/krb5-renew.c:82
52 nullPointerRedundantCheck:portable/krb5-renew.c:83
53
54 // (krb5-strength) Bug in cppcheck 2.12.0.
55 nullPointerRedundantCheck:tests/plugin/heimdal-t.c:81
56 nullPointerRedundantCheck:tests/plugin/mit-t.c:91
57 nullPointerRedundantCheck:tests/plugin/mit-t.c:97
58
59 // Setting the variable to NULL explicitly after deallocation.
60 redundantAssignment:tests/pam-util/options-t.c
61
62 // (remctl) Bug in cppcheck 1.89 (fixed in 2.3).  The address of these
63 // variables are passed to a PHP function.
64 uninitvar:php/php_remctl.c:119
65 uninitvar:php/php_remctl.c:123
66 uninitvar:php/php_remctl.c:315
67 uninitvar:php/php5_remctl.c:125
68 uninitvar:php/php5_remctl.c:129
69 uninitvar:php/php5_remctl.c:321
70
71 // (remctl) Bug in cppcheck 1.82.  A pointer to this array is stored in a
72 // struct that's passed to another function.
73 redundantAssignment:tests/server/acl-t.c
74
75 // (pam-krb5) cppcheck doesn't recognize the unused attribute on labels.
76 unusedLabel:module/auth.c:895
77 unusedLabelConfiguration:module/auth.c:895
78
79 // Bug in cppcheck 2.7.  Two possible struct layouts are chosen based on the
80 // ABI, and the one chosen is used, but cppcheck always warns about both even
81 // if the preprocessor conditionals are identical.
82 unusedStructMember:kafs/sys-solaris.c