Skip to content

Commit 80b1271

Browse files
committed
Astyle running and added test cases for functions in std.cfg.
1 parent 26af1a2 commit 80b1271

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

cli/cppcheckexecutor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,16 +289,16 @@ static void CppcheckSignalHandler(int signo, siginfo_t * info, void * /*context*
289289
break;
290290
*/
291291
case SIGINT:
292-
bPrintCallstack=false;
293-
break;
292+
bPrintCallstack=false;
293+
break;
294294
default:
295295
fprintf(stderr, "Internal error (caught signal %d)\n",
296296
signo);
297297
break;
298298
}
299299
if (bPrintCallstack) {
300-
print_stacktrace(stderr, false);
301-
fprintf(stderr, "Please report this to the cppcheck developers!\n");
300+
print_stacktrace(stderr, false);
301+
fprintf(stderr, "Please report this to the cppcheck developers!\n");
302302
}
303303
abort();
304304
}

test/testnullpointer.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,6 +2409,15 @@ class TestNullPointer : public TestFixture {
24092409
check("void f(char*p,char*q){ strcpy (p,q);if(!p||!q){}}");
24102410
ASSERT_EQUALS(errpq,errout.str());
24112411

2412+
check("void f(char*p,char*q){ strspn (p,q);if(!p||!q){}}");
2413+
ASSERT_EQUALS(errpq,errout.str());
2414+
2415+
check("void f(char*p,char*q){ strcspn (p,q);if(!p||!q){}}");
2416+
ASSERT_EQUALS(errpq,errout.str());
2417+
2418+
check("void f(char*p,char*q){ strcoll (p,q);if(!p||!q){}}");
2419+
ASSERT_EQUALS(errpq,errout.str());
2420+
24122421
check("void f(char*p,char*q){ strcat (p,q);if(!p||!q){}}");
24132422
ASSERT_EQUALS(errpq,errout.str());
24142423

0 commit comments

Comments
 (0)