Hi, I made a code sample, on which null pointer error or warning should be reported by cppcheck. But I can't get the expected result.
#include <stdio.h> void main() { char * p = NULL; char ** x = NULL; char * s = "abc"; for ( ;; ) { if(p) { *x = s; } else { p = s; printf("got p\n"); } } printf("null point\n"); }
Could you help take a look? Thanks!
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/13503
Log in to post a comment.
Hi, I made a code sample, on which null pointer error or warning should be reported by cppcheck. But I can't get the expected result.
Could you help take a look? Thanks!
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/13503