/in/foo.cc: In function 'void init()':
/in/foo.cc:19:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0; i<strlen(Yangjz); ++i) {
~^~~~~~~~~~~~~~~
/in/foo.cc: In function 'void turnnumber()':
/in/foo.cc:30:27: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'int' [-Wformat=]
sprintf(Yangjz, "%lld", M);
^
/in/foo.cc:31:7: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (i<strlen(Yangjz)) {
~^~~~~~~~~~~~~~~
/in/foo.cc: In function 'long long int kmp()':
/in/foo.cc:58:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (j >= P.length()) {
~~^~~~~~~~~~~~~
/in/foo.cc: In function 'void init()':
/in/foo.cc:15:6: warning: '%lld' directive writing between 1 and 11 bytes into a region of size 6 [-Wformat-overflow=]
void init() {
^~~~
/in/foo.cc:15:6: note: directive argument in the range [-2147483648, 2147483648]
/in/foo.cc:18:10: note: 'sprintf' output between 2 and 12 bytes into a destination of size 6
sprintf(Yangjz, "%lld", i);
~~~~~~~^~~~~~~~~~~~~~~~~~~