From: Ted Kremenek Date: Wed, 24 Sep 2008 06:40:03 +0000 (+0000) Subject: Updated test case. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cafd9089a4745414eedb93d0b543d9d22c6b55ae;p=clang Updated test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56548 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 #include @@ -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