Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 6 years ago

Language

C

Compiler

clang 8.0.0

Options
Warnings
C11(GNU)
no pedantic

Author

anonymous

about 6 years ago

02student.txt

$ clang prog.c -Wall -Wextra -std=gnu11
prog.c:15:1: warning: treating Unicode character as whitespace [-Wunicode-whitespace]
  
^~
prog.c:15:4: warning: treating Unicode character as whitespace [-Wunicode-whitespace]
  
  ^~
prog.c:17:1: warning: treating Unicode character as whitespace [-Wunicode-whitespace]
   if((fp=fopen("02student.txt","r"))==NULL);
^~
prog.c:17:4: warning: treating Unicode character as whitespace [-Wunicode-whitespace]
   if((fp=fopen("02student.txt","r"))==NULL);
  ^~
prog.c:17:49: warning: if statement has empty body [-Wempty-body]
   if((fp=fopen("02student.txt","r"))==NULL);
                                              ^
prog.c:17:49: note: put the semicolon on a separate line to silence this warning
prog.c:21:7: warning: format specifies type 'int *' but the argument has type 'int' [-Wformat]
        ,st[i].student_id, st[i].name, st[i].gender, st[i].point));
         ^~~~~~~~~~~~~~~~
prog.c:21:37: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat]
        ,st[i].student_id, st[i].name, st[i].gender, st[i].point));
                                       ^~~~~~~~~~~~
prog.c:21:51: warning: format specifies type 'int *' but the argument has type 'int' [-Wformat]
        ,st[i].student_id, st[i].name, st[i].gender, st[i].point));
                                                     ^~~~~~~~~~~
prog.c:21:64: warning: if statement has empty body [-Wempty-body]
        ,st[i].student_id, st[i].name, st[i].gender, st[i].point));
                                                                  ^
prog.c:21:64: note: put the semicolon on a separate line to silence this warning
9 warnings generated.
Signal:
Segmentation fault