/in/foo.cc: In function 'int main()':
/in/foo.cc:11:18: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
scanf("%d\n",&n);
^
/in/foo.cc:13:4: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(str);
^~~~
In file included from /usr/include/c++/6/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:46,
from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^~~~
/in/foo.cc:13:12: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
gets(str);
^
In file included from /usr/include/c++/6/cstdio:42:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:46,
from /in/foo.cc:1:
/usr/include/stdio.h:640:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^~~~
/in/foo.cc:29:59: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
printf("%03d-%04d %d\n",li[i-1]/10000,li[i-1]%10000,s);
^
/in/foo.cc:29:59: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
/in/foo.cc:29:59: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
/tmp/ccO32ZZH.o: In function `main':
foo.cc:(.text.startup+0x60): warning: the `gets' function is dangerous and should not be used.