1 /* Verify that we check for uninitialized values passed to functions
2 that we have special-cased state-machine handling for. */
4 typedef struct FILE FILE;
6 FILE* fopen (const char*, const char*);
8 int fseek (FILE *, long, int);
11 test_fopen_uninit_path (void)
14 FILE *f
= fopen (path
, "r"); /* { dg-warning "use of uninitialized value 'path'" } */
19 test_fopen_uninit_mode (const char *path
)
22 FILE *f
= fopen (path
, mode
); /* { dg-warning "use of uninitialized value 'mode'" } */
27 test_fclose_uninit (void)
30 fclose (f
); /* { dg-warning "use of uninitialized value 'f'" } */
34 test_fseek_uninit_stream (void)
37 return fseek (stream
, 0, 0); /* { dg-warning "use of uninitialized value 'stream'" } */
41 test_fseek_uninit_offset (FILE *stream
, int whence
)
44 return fseek (stream
, offset
, whence
); /* { dg-warning "use of uninitialized value 'offset'" } */
48 test_fseek_uninit_whence (FILE *stream
, long offset
)
51 return fseek (stream
, offset
, whence
); /* { dg-warning "use of uninitialized value 'whence'" } */