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:
@@ -143,7 +143,7 @@ void f15() {
|
||||
int a[10];
|
||||
bar(a);
|
||||
if (a[1]) // no-warning
|
||||
1;
|
||||
(void)1;
|
||||
}
|
||||
|
||||
struct s3 p[1];
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user