Skip to content

Commit

Permalink
suppress, fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jul 20, 2023
1 parent 0843ce9 commit 1907388
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cfg/qt.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
<noreturn>false</noreturn>
<returnValue type="QAction *"/>
<leak-ignore/>
<arg nr="1"">
<arg nr="1">
<not-uninit/>
<not-bool/>
</arg>
Expand Down
15 changes: 10 additions & 5 deletions test/cfg/std.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,15 @@ size_t nullPointer_strlen(const char *s)
return strlen(s);
}

void nullpointerMemchr1(char *p, const char *s)
// cppcheck-suppress constParameterPointer
void nullpointerMemchr1(char *p, char *s)
{
p = memchr(s, 'p', strlen(s));
(void)p;
}

void nullpointerMemchr2(char *p, const char *s)
// cppcheck-suppress constParameterPointer
void nullpointerMemchr2(char *p, char *s)
{
p = memchr(s, 0, strlen(s));
(void)p;
Expand Down Expand Up @@ -4475,7 +4477,8 @@ void uninitvar_swscanf(void)

void uninitvar_system(void)
{
const char *c;
// cppcheck-suppress constVariablePointer
char *c;
// cppcheck-suppress uninitvar
(void)system(c);
}
Expand Down Expand Up @@ -4907,7 +4910,8 @@ void nullPointer_feholdexcept(void)

void nullPointer_fesetenv(void)
{
const fenv_t* envp = 0;
// cppcheck-suppress constVariablePointer
fenv_t* envp = 0;
// cppcheck-suppress nullPointer
(void)fesetenv(envp);
// cppcheck-suppress nullPointer
Expand All @@ -4916,7 +4920,8 @@ void nullPointer_fesetenv(void)

void nullPointer_fesetexceptflag(int excepts)
{
const fexcept_t* flagp = 0;
// cppcheck-suppress constVariablePointer
fexcept_t* flagp = 0;
// cppcheck-suppress nullPointer
(void)fesetexceptflag(flagp,excepts);
// cppcheck-suppress nullPointer
Expand Down

0 comments on commit 1907388

Please sign in to comment.