miners.cpp: In function 'int main()':
miners.cpp:44:13: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[100005]' [-Wformat=]
44 | scanf("%s",&s);
| ~^ ~~
| | |
| | char (*)[100005]
| char*
miners.cpp: In function 'void usaco(std::string)':
miners.cpp:5:29: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
5 | void usaco(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
miners.cpp:5:66: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
5 | void usaco(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
miners.cpp: In function 'int main()':
miners.cpp:43:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
43 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
miners.cpp:44:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
44 | scanf("%s",&s);
| ~~~~~^~~~~~~~~
miners.cpp:24:11: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
24 | x|=(id<<4);
| ~~~^~~~
miners.cpp:50:13: note: 'id' was declared here
50 | int id;
| ^~