foo.cc: In function ‘bool checked1(std::string, std::string)’:
foo.cc:14:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
14 | while (a[i]=='0' && i<a.size()) // 找 a的非 0位
| ~^~~~~~~~~
foo.cc:18:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
18 | while (b[j]=='0' && j<b.size()) // 找 b的非 0位
| ~^~~~~~~~~
foo.cc:22:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
22 | if (i==a.size())
| ~^~~~~~~~~~
foo.cc: In function ‘bool checked2(std::string, std::string)’:
foo.cc:46:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
46 | while (a[i]=='0' && i<a.size()) // 找 a的非 0位
| ~^~~~~~~~~
foo.cc:50:30: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
50 | while (b[j]=='0' && j<b.size()) // 找 b的非 0位
| ~^~~~~~~~~
foo.cc:54:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
54 | if (i==a.size())
| ~^~~~~~~~~~
foo.cc: In function ‘bool checked1(std::string, std::string)’:
foo.cc:42:1: warning: control reaches end of non-void function [-Wreturn-type]
42 | }
| ^
foo.cc: In function ‘bool checked2(std::string, std::string)’:
foo.cc:74:1: warning: control reaches end of non-void function [-Wreturn-type]
74 | }
| ^