necklace.cpp: In function 'Data get(std::string, std::string, bool)':
necklace.cpp:32:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
32 | for(int j = 1 ; j < s1.size() ; j++)
| ~~^~~~~~~~~~~
necklace.cpp:40:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
40 | for(int j = 1 ; j < s2.size() ; j++)
| ~~^~~~~~~~~~~
necklace.cpp: In function 'int main()':
necklace.cpp:64:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
64 | freopen(name".inp" , "r" , stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
necklace.cpp:65:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
65 | freopen(name".out" , "w" , stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
necklace.cpp: In function 'Data get(std::string, std::string, bool)':
necklace.cpp:43:51: warning: array subscript -1 is below array bounds of 'int [12345]' [-Warray-bounds]
43 | while(k && s2[j] != s2[k]) k = p2[ - 1];
| ~~~~~~~^