traincrisis

for 1ue888

Sep 24th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | Fixit | 0 0
  1. david@nata-HP-Laptop-15s-eq2xxx:~$ gcc main.c -std=c99 -o CGoL
  2. main.c: In function ‘draw’:
  3. main.c:77:21: warning: embedded ‘\0’ in format [-Wformat-contains-nul]
  4. 77 | printf("%s\n\0",lines[i]);
  5. | ^~
  6. main.c: In function ‘handleCmd’:
  7. main.c:192:13: error: a label can only be part of a statement and a declaration is not a statement
  8. 192 | int rS=atoi(arg0);
  9. | ^~~
  10. main.c:193:13: error: expected expression before ‘int’
  11. 193 | int rR=atoi(arg1);
  12. | ^~~
  13. main.c:205:25: error: ‘rR’ undeclared (first use in this function); did you mean ‘rS’?
  14. 205 | int dig=rR%10;
  15. | ^~
  16. | rS
  17. main.c:205:25: note: each undeclared identifier is reported only once for each function it appears in
  18. main.c: In function ‘main’:
  19. main.c:225:13: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[16]’ [-Wformat=]
  20. 225 | scanf("%s %s %s",&arg0,&arg1,&arg2);
  21. | ~^ ~~~~~
  22. | | |
  23. | char * char (*)[16]
  24. main.c:225:16: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char (*)[16]’ [-Wformat=]
  25. 225 | scanf("%s %s %s",&arg0,&arg1,&arg2);
  26. | ~^ ~~~~~
  27. | | |
  28. | char * char (*)[16]
  29. main.c:225:19: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘char (*)[16]’ [-Wformat=]
  30. 225 | scanf("%s %s %s",&arg0,&arg1,&arg2);
  31. | ~^ ~~~~~
  32. | | |
  33. | char * char (*)[16]
  34. main.c:250:21: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[8]’ [-Wformat=]
  35. 250 | scanf("%s %s %s %s %s",&cmd,&arg0,&arg1,&arg2,&arg3);
  36. | ~^ ~~~~
  37. | | |
  38. | char * char (*)[8]
  39. main.c:250:24: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char (*)[16]’ [-Wformat=]
  40. 250 | scanf("%s %s %s %s %s",&cmd,&arg0,&arg1,&arg2,&arg3);
  41. | ~^ ~~~~~
  42. | | |
  43. | char * char (*)[16]
  44. main.c:250:27: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘char (*)[16]’ [-Wformat=]
  45. 250 | scanf("%s %s %s %s %s",&cmd,&arg0,&arg1,&arg2,&arg3);
  46. | ~^ ~~~~~
  47. | | |
  48. | char * char (*)[16]
  49. main.c:250:30: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘char (*)[16]’ [-Wformat=]
  50. 250 | scanf("%s %s %s %s %s",&cmd,&arg0,&arg1,&arg2,&arg3);
  51. | ~^ ~~~~~
  52. | | |
  53. | char * char (*)[16]
  54. main.c:250:33: warning: format ‘%s’ expects argument of type ‘char *’, but argument 6 has type ‘char (*)[16]’ [-Wformat=]
  55. 250 | scanf("%s %s %s %s %s",&cmd,&arg0,&arg1,&arg2,&arg3);
  56. | ~^ ~~~~~
  57. | | |
  58. | char * char (*)[16]
  59. main.c:263:17: warning: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration]
  60. 263 | usleep(interval*1000);
  61. | ^~~~~~
  62. | sleep
  63.  
Advertisement
Add Comment
Please, Sign In to add comment