diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-09-24 06:40:03 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-09-24 06:40:03 +0000 |
commit | cafd9089a4745414eedb93d0b543d9d22c6b55ae (patch) | |
tree | b68ac145a283a8495ccfa3d6a93b261327fa79dd | |
parent | 86957eb200492e95a09bce1b2c76f66345468f84 (diff) |
Updated test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56548 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/null-deref-ps.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c index 1fdcd06d43..a085d5a963 100644 --- a/test/Analysis/null-deref-ps.c +++ b/test/Analysis/null-deref-ps.c @@ -1,4 +1,4 @@ -// RUN: clang -checker-simple -verify %s +// RUN: clang -std=gnu99 -checker-simple -verify %s #include<stdint.h> #include <assert.h> @@ -94,8 +94,9 @@ int* qux(); int f9(unsigned len) { assert (len != 0); int *p = 0; + unsigned i; - for (unsigned i = 0; i < len; ++i) + for (i = 0; i < len; ++i) p = qux(i); return *p++; // no-warning @@ -104,8 +105,9 @@ int f9(unsigned len) { int f9b(unsigned len) { assert (len > 0); // note use of '>' int *p = 0; + unsigned i; - for (unsigned i = 0; i < len; ++i) + for (i = 0; i < len; ++i) p = qux(i); return *p++; // no-warning |