Open WILDWEEGEE opened 6 years ago
BUG REPORT: /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:7:12: warning: Dereference of null pointer (loaded from variable 'p') return p + 4; ^ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:13:9: note: Assuming 'argc' is >= 2 if (argc >= 2 && strcmp(argv[1], "test")) { ^~~~~ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:13:9: note: Left side of '&&' is true /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:13:5: note: Taking true branch if (argc >= 2 && strcmp(argv[1], "test")) { ^ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:14:9: note: Null pointer value stored to 'p' p = NULL; ^~~~ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:16:42: note: Passing null pointer value via 1st parameter 'p' printf("The number is %d\n", helper2(p)); ^ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:16:34: note: Calling 'helper2' printf("The number is %d\n", helper2(p)); ^~~~~~ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:7:12: note: Dereference of null pointer (loaded from variable 'p') return p + 4; ^~ 1 warning generated.
BUG REPORT: /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:7:12: warning: Dereference of null pointer (loaded from variable 'p') return p + 4; ^ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:13:9: note: Assuming 'argc' is >= 2 if (argc >= 2 && strcmp(argv[1], "test")) { ^
~~~~ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:13:9: note: Left side of '&&' is true /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:13:5: note: Taking true branch if (argc >= 2 && strcmp(argv[1], "test")) { ^ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:14:9: note: Null pointer value stored to 'p' p = NULL; ^~~~ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:16:42: note: Passing null pointer value via 1st parameter 'p' printf("The number is %d\n", helper2(p)); ^ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:16:34: note: Calling 'helper2' printf("The number is %d\n", helper2(p)); ^~~~~~ /home/student/Documents/CIS400/CIS400App/my-first-app/temp/test_repo/test_clang/test.c:7:12: note: Dereference of null pointer (loaded from variable 'p') return p + 4; ^~ 1 warning generated.