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.

llvm-svn: 77630
This commit is contained in:
Anders Carlsson
2009-07-30 22:37:41 +00:00
parent 658fe02d17
commit 499de4252d
3 changed files with 3 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ void f15() {
int a[10];
bar(a);
if (a[1]) // no-warning
1;
(void)1;
}
struct s3 p[1];

View File

@@ -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) {

View File

@@ -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
}