Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 5 years ago

Language

C

Compiler

gcc HEAD 10.0.0 20191203 (experimental)

Options
Warnings
C11(GNU)
no pedantic

Author

anonymous

over 5 years ago

$ gcc prog.c -Wall -Wextra -std=gnu11
prog.c: In function 'main':
prog.c:17:17: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[10]' [-Wformat=]
   17 |         scanf("%s %d %d",&command, &v, &add);
      |                ~^        ~~~~~~~~
      |                 |        |
      |                 char *   char (*)[10]
prog.c:18:21: warning: comparison with string literal results in unspecified behavior [-Waddress]
   18 |         if (command == "SET"){
      |                     ^~
prog.c:31:26: warning: comparison with string literal results in unspecified behavior [-Waddress]
   31 |         else if (command == "ADD"){
      |                          ^~
prog.c:12:10: warning: unused variable 'str' [-Wunused-variable]
   12 |     char str[3];
      |          ^~~
Exit Code:
0