diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-07-14 23:43:06 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-07-14 23:43:06 +0000 |
commit | f0b28d7fe52f22a30c25d8f5fdb49d6c6303a59c (patch) | |
tree | 4fde811e045e8c9713082dfe04554f715cd63a38 /clang/test/Sema/uninit-variables.c | |
parent | d7f2f9d07b0d61bbe12ab118d4402ef22882ce5b (diff) | |
download | bcm5719-llvm-f0b28d7fe52f22a30c25d8f5fdb49d6c6303a59c.tar.gz bcm5719-llvm-f0b28d7fe52f22a30c25d8f5fdb49d6c6303a59c.zip |
Fix false negative reported in PR 10358 by using 'Unknown' in -Wuninitialized to avoid cascading warnings. Patch by Kaelyn Uhrain.
llvm-svn: 135217
Diffstat (limited to 'clang/test/Sema/uninit-variables.c')
-rw-r--r-- | clang/test/Sema/uninit-variables.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Sema/uninit-variables.c b/clang/test/Sema/uninit-variables.c index b70a29519c4..06abc76019b 100644 --- a/clang/test/Sema/uninit-variables.c +++ b/clang/test/Sema/uninit-variables.c @@ -77,7 +77,7 @@ int test11(unsigned n) { } void test12(unsigned n) { - for (unsigned i ; n ; ++i) ; // expected-warning{{variable 'i' may be uninitialized when used here}} expected-note{{variable 'i' is declared here}} expected-note{{add initialization to silence this warning}} + for (unsigned i ; n ; ++i) ; // expected-warning{{variable 'i' is uninitialized when used here}} expected-note{{variable 'i' is declared here}} expected-note{{add initialization to silence this warning}} } int test13() { @@ -237,7 +237,7 @@ void test36() void **pc; // expected-note{{variable 'pc' is declared here}} expected-note{{add initialization to silence this warning}} void *dummy[] = { &&L1, &&L2 }; L1: - goto *pc; // expected-warning{{variable 'pc' may be uninitialized when used here}} + goto *pc; // expected-warning{{variable 'pc' is uninitialized when used here}} L2: goto *pc; } @@ -289,7 +289,7 @@ void test43_aux(int x); void test43(int i) { int x; // expected-note {{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}} for (i = 0 ; i < 10; i++) - test43_aux(x++); // expected-warning {{variable 'x' may be uninitialized when used here}} + test43_aux(x++); // expected-warning {{variable 'x' is uninitialized when used here}} } void test44(int i) { @@ -297,7 +297,7 @@ void test44(int i) { int y; // expected-note {{variable 'y' is declared here}} expected-note{{add initialization to silence this warning}} for (i = 0; i < 10; i++ ) { test43_aux(x++); // no-warning - x += y; // expected-warning {{variable 'y' may be uninitialized when used here}} + x += y; // expected-warning {{variable 'y' is uninitialized when used here}} } } |