Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exercise1.c: In function ‘main’:
  2. exercise1.c:12:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  3.      fscanf("%d",&num1);
  4.      ^
  5. In file included from /usr/include/features.h:374:0,
  6.                  from /usr/include/stdio.h:27,
  7.                  from exercise1.c:2:
  8. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  9.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  10.             ^
  11. exercise1.c:12:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  12.      fscanf("%d",&num1);
  13.      ^
  14. In file included from /usr/include/features.h:374:0,
  15.                  from /usr/include/stdio.h:27,
  16.                  from exercise1.c:2:
  17. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  18.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  19.             ^
  20. exercise1.c:12:5: warning: format not a string literal and no format arguments [-Wformat-security]
  21.      fscanf("%d",&num1);
  22.      ^
  23. exercise1.c:14:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  24.      fscanf("%d",&num2);
  25.      ^
  26. In file included from /usr/include/features.h:374:0,
  27.                  from /usr/include/stdio.h:27,
  28.                  from exercise1.c:2:
  29. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  30.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  31.             ^
  32. exercise1.c:14:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  33.      fscanf("%d",&num2);
  34.      ^
  35. In file included from /usr/include/features.h:374:0,
  36.                  from /usr/include/stdio.h:27,
  37.                  from exercise1.c:2:
  38. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  39.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  40.             ^
  41. exercise1.c:14:5: warning: format not a string literal and no format arguments [-Wformat-security]
  42.      fscanf("%d",&num2);
  43.      ^
  44. exercise1.c:15:5: error: too few arguments to function ‘fclose’
  45.      fclose();
  46.      ^
  47. In file included from exercise1.c:2:0:
  48. /usr/include/stdio.h:237:12: note: declared here
  49.  extern int fclose (FILE *__stream);
  50.             ^
  51. zergut@zergut-HP-15-Notebook-PC:~/C prog$ gcc exercise1.c
  52. exercise1.c: In function ‘main’:
  53. exercise1.c:12:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  54.      fscanf("%d",&num1);
  55.      ^
  56. In file included from /usr/include/features.h:374:0,
  57.                  from /usr/include/stdio.h:27,
  58.                  from exercise1.c:2:
  59. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  60.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  61.             ^
  62. exercise1.c:12:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  63.      fscanf("%d",&num1);
  64.      ^
  65. In file included from /usr/include/features.h:374:0,
  66.                  from /usr/include/stdio.h:27,
  67.                  from exercise1.c:2:
  68. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  69.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  70.             ^
  71. exercise1.c:12:5: warning: format not a string literal and no format arguments [-Wformat-security]
  72.      fscanf("%d",&num1);
  73.      ^
  74. exercise1.c:14:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  75.      fscanf("%d",&num2);
  76.      ^
  77. In file included from /usr/include/features.h:374:0,
  78.                  from /usr/include/stdio.h:27,
  79.                  from exercise1.c:2:
  80. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  81.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  82.             ^
  83. exercise1.c:14:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  84.      fscanf("%d",&num2);
  85.      ^
  86. In file included from /usr/include/features.h:374:0,
  87.                  from /usr/include/stdio.h:27,
  88.                  from exercise1.c:2:
  89. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  90.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  91.             ^
  92. exercise1.c:14:5: warning: format not a string literal and no format arguments [-Wformat-security]
  93.      fscanf("%d",&num2);
  94.      ^
  95. zergut@zergut-HP-15-Notebook-PC:~/C prog$ clear
  96.  
  97. zergut@zergut-HP-15-Notebook-PC:~/C prog$ gcc exercise1.c
  98. exercise1.c: In function ‘main’:
  99. exercise1.c:12:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  100.      fscanf("%d",&num1);
  101.      ^
  102. In file included from /usr/include/features.h:374:0,
  103.                  from /usr/include/stdio.h:27,
  104.                  from exercise1.c:2:
  105. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  106.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  107.             ^
  108. exercise1.c:12:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  109.      fscanf("%d",&num1);
  110.      ^
  111. In file included from /usr/include/features.h:374:0,
  112.                  from /usr/include/stdio.h:27,
  113.                  from exercise1.c:2:
  114. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  115.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  116.             ^
  117. exercise1.c:12:5: warning: format not a string literal and no format arguments [-Wformat-security]
  118.      fscanf("%d",&num1);
  119.      ^
  120. exercise1.c:14:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  121.      fscanf("%d",&num2);
  122.      ^
  123. In file included from /usr/include/features.h:374:0,
  124.                  from /usr/include/stdio.h:27,
  125.                  from exercise1.c:2:
  126. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  127.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  128.             ^
  129. exercise1.c:14:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  130.      fscanf("%d",&num2);
  131.      ^
  132. In file included from /usr/include/features.h:374:0,
  133.                  from /usr/include/stdio.h:27,
  134.                  from exercise1.c:2:
  135. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  136.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  137.             ^
  138. exercise1.c:14:5: warning: format not a string literal and no format arguments [-Wformat-security]
  139.      fscanf("%d",&num2);
  140.      ^
  141. zergut@zergut-HP-15-Notebook-PC:~/C prog$ clear
  142.  
  143. zergut@zergut-HP-15-Notebook-PC:~/C prog$ gcc exercise1.c
  144. exercise1.c: In function ‘main’:
  145. exercise1.c:12:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  146.      fscanf("%d",&num1);
  147.      ^
  148. In file included from /usr/include/features.h:374:0,
  149.                  from /usr/include/stdio.h:27,
  150.                  from exercise1.c:2:
  151. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  152.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  153.             ^
  154. exercise1.c:12:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  155.      fscanf("%d",&num1);
  156.      ^
  157. In file included from /usr/include/features.h:374:0,
  158.                  from /usr/include/stdio.h:27,
  159.                  from exercise1.c:2:
  160. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  161.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  162.             ^
  163. exercise1.c:12:5: warning: format not a string literal and no format arguments [-Wformat-security]
  164.      fscanf("%d",&num1);
  165.      ^
  166. exercise1.c:14:5: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
  167.      fscanf("%d",&num2);
  168.      ^
  169. In file included from /usr/include/features.h:374:0,
  170.                  from /usr/include/stdio.h:27,
  171.                  from exercise1.c:2:
  172. /usr/include/stdio.h:443:12: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *
  173.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  174.             ^
  175. exercise1.c:14:5: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
  176.      fscanf("%d",&num2);
  177.      ^
  178. In file included from /usr/include/features.h:374:0,
  179.                  from /usr/include/stdio.h:27,
  180.                  from exercise1.c:2:
  181. /usr/include/stdio.h:443:12: note: expected ‘const char * __restrict__’ but argument is of type ‘int *
  182.  extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
  183.             ^
  184. exercise1.c:14:5: warning: format not a string literal and no format arguments [-Wformat-security]
  185.      fscanf("%d",&num2);
  186.      ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement