]> granicus.if.org Git - clang/commitdiff
Prep for new warning.
authorMike Stump <mrs@apple.com>
Tue, 21 Jul 2009 18:51:31 +0000 (18:51 +0000)
committerMike Stump <mrs@apple.com>
Tue, 21 Jul 2009 18:51:31 +0000 (18:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76610 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/null-deref-ps.c

index eb3812cf12d53dd95407f18bafecc6e0d21a0aeb..a31bcecf971021cd1db93d55324e7009b32d029c 100644 (file)
@@ -74,6 +74,7 @@ int f4_b() {
   else return; // expected-warning {{non-void function 'f4_b' should return a value}}
 
   *p += 10; // expected-warning{{Dereference of null pointer}}
+  return 0;
 }
 
 
@@ -162,7 +163,7 @@ int* f7c2(int *x) {
 }
 
 
-int f8(int *p, int *q) {
+void f8(int *p, int *q) {
   if (!p)
     if (p)
       *p = 1; // no-warning