aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-07-30 22:37:41 +0000
committerAnders Carlsson <andersca@mac.com>2009-07-30 22:37:41 +0000
commit9668b1f6c87bd8d9af87e29900508a52584404ef (patch)
treed0a10a8a8fbc1805ba9d3bc779abcbbcd072d3d0
parentb3589f44c5d295cd41de2c83f3475116835eeebd (diff)
Add casts to avoid a bunch of unused expr warnings. (They aren't reported right now due to a bug that I intend to fix). Ted, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77630 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/array-struct.c2
-rw-r--r--test/Analysis/casts.c2
-rw-r--r--test/Analysis/region-only-test.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c
index ba6781eec4..d6b6076a14 100644
--- a/test/Analysis/array-struct.c
+++ b/test/Analysis/array-struct.c
@@ -143,7 +143,7 @@ void f15() {
int a[10];
bar(a);
if (a[1]) // no-warning
- 1;
+ (void)1;
}
struct s3 p[1];
diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c
index cd57a63bc2..f78ea69894 100644
--- a/test/Analysis/casts.c
+++ b/test/Analysis/casts.c
@@ -28,7 +28,7 @@ void f1(struct s **pval) {
tbool = (int *)pval; // Should record the cast-to type here.
char c = (unsigned char) *tbool; // Should use cast-to type to create symbol.
if (*tbool == -1)
- 3;
+ (void)3;
}
void f2(const char *str) {
diff --git a/test/Analysis/region-only-test.c b/test/Analysis/region-only-test.c
index 64d3fcd57b..8908adb105 100644
--- a/test/Analysis/region-only-test.c
+++ b/test/Analysis/region-only-test.c
@@ -9,5 +9,5 @@ void foo(int* p) {
if (p[0] == 1)
x = &a;
if (p[0] == 1)
- *x; // no-warning
+ (void)*x; // no-warning
}