1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/* * Rule: FIO08-C * Source: wiki * Status: PASS - Should NOT trigger FIO08-C violation */ FILE *file; char *file_name; /* Initialize file_name */ file = fopen(file_name, "w+"); if (file == NULL) { /* Handle error condition */ } if (unlink(file_name) != 0) { /* Handle error condition */ } /* Continue performing I/O operations on file */ fclose(file);