summaryrefslogtreecommitdiffstats
path: root/test/Analysis/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/stream.c')
-rw-r--r--test/Analysis/stream.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/Analysis/stream.c b/test/Analysis/stream.c
index e68835e..4a095cf 100644
--- a/test/Analysis/stream.c
+++ b/test/Analysis/stream.c
@@ -16,25 +16,25 @@ extern void rewind (FILE *__stream);
void f1(void) {
FILE *p = fopen("foo", "r");
char buf[1024];
- fread(buf, 1, 1, p); // expected-warning {{Stream pointer might be NULL.}}
+ fread(buf, 1, 1, p); // expected-warning {{Stream pointer might be NULL}}
fclose(p);
}
void f2(void) {
FILE *p = fopen("foo", "r");
- fseek(p, 1, SEEK_SET); // expected-warning {{Stream pointer might be NULL.}}
+ fseek(p, 1, SEEK_SET); // expected-warning {{Stream pointer might be NULL}}
fclose(p);
}
void f3(void) {
FILE *p = fopen("foo", "r");
- ftell(p); // expected-warning {{Stream pointer might be NULL.}}
+ ftell(p); // expected-warning {{Stream pointer might be NULL}}
fclose(p);
}
void f4(void) {
FILE *p = fopen("foo", "r");
- rewind(p); // expected-warning {{Stream pointer might be NULL.}}
+ rewind(p); // expected-warning {{Stream pointer might be NULL}}
fclose(p);
}
@@ -43,26 +43,26 @@ void f5(void) {
if (!p)
return;
fseek(p, 1, SEEK_SET); // no-warning
- fseek(p, 1, 3); // expected-warning {{The whence argument to fseek() should be SEEK_SET, SEEK_END, or SEEK_CUR.}}
+ fseek(p, 1, 3); // expected-warning {{The whence argument to fseek() should be SEEK_SET, SEEK_END, or SEEK_CUR}}
fclose(p);
}
void f6(void) {
FILE *p = fopen("foo", "r");
fclose(p);
- fclose(p); // expected-warning {{Try to close a file Descriptor already closed. Cause undefined behaviour.}}
+ fclose(p); // expected-warning {{Try to close a file Descriptor already closed. Cause undefined behaviour}}
}
void f7(void) {
FILE *p = tmpfile();
- ftell(p); // expected-warning {{Stream pointer might be NULL.}}
+ ftell(p); // expected-warning {{Stream pointer might be NULL}}
fclose(p);
}
void f8(int c) {
FILE *p = fopen("foo.c", "r");
if(c)
- return; // expected-warning {{Opened File never closed. Potential Resource leak.}}
+ return; // expected-warning {{Opened File never closed. Potential Resource leak}}
fclose(p);
}
OpenPOWER on IntegriCloud