aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/stream.c')
-rw-r--r--test/Analysis/stream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Analysis/stream.c b/test/Analysis/stream.c
index f834a6a603..2b6a90353b 100644
--- a/test/Analysis/stream.c
+++ b/test/Analysis/stream.c
@@ -32,3 +32,10 @@ void f4(void) {
rewind(p); // expected-warning {{Stream pointer might be NULL.}}
}
+void f5(void) {
+ FILE *p = fopen("foo", "r");
+ 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.}}
+}