foo.c: In function 'main':
foo.c:7:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
7 | gets(s);
| ^~~~
In file included from /usr/include/stdio.h:867,
from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.c:8:2: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
8 | strcat(s,s1);
| ^~~~~~
foo.c:8:2: warning: incompatible implicit declaration of built-in function 'strcat'
foo.c:2:1: note: include '<string.h>' or provide a declaration of 'strcat'
1 | #include<stdio.h>
+++ |+#include <string.h>
2 | int main()
foo.c:9:10: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
9 | int n = strlen(s);
| ^~~~~~
foo.c:9:10: warning: incompatible implicit declaration of built-in function 'strlen'
foo.c:9:10: note: include '<string.h>' or provide a declaration of 'strlen'
foo.c:20:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
20 | for(j=0;j<max_len;j++)
| ^~~
foo.c:22:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
22 | j=i;
| ^
foo.c:23:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
23 | for(;i<=j+len[max_len]+1;i++)
| ^~~
foo.c:25:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
25 | return 0;
| ^~~~~~
foo.c:7:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
7 | gets(s);
| ^~~~~~~
/usr/bin/ld: /tmp/ccDK7hFO.o: in function `main':
foo.c:(.text.startup+0x58): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务