/in/foo.cc: In function 'void AtoB(std::string)':
/in/foo.cc:7:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
7 | for (int i = 1; i < s.length(); ++i) {
| ~~^~~~~~~~~~~~
/in/foo.cc:13:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
13 | while (j < s.length()) {
| ~~^~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:32:20: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
32 | int T; scanf("%d", T);
| ~^ ~
| | |
| | int
| int*
/in/foo.cc:32:17: warning: 'T' is used uninitialized [-Wuninitialized]
32 | int T; scanf("%d", T);
| ~~~~~^~~~~~~~~
/in/foo.cc:32:9: note: 'T' was declared here
32 | int T; scanf("%d", T);
| ^
/in/foo.cc: In function 'void AtoB(std::string)':
/in/foo.cc:13:12: warning: 'j' may be used uninitialized [-Wmaybe-uninitialized]
13 | while (j < s.length()) {
| ^
/in/foo.cc:6:23: note: 'j' was declared here
6 | int a = 0, b = 0, j;
| ^