foo.cc: In function ‘int main()’:
foo.cc:10:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
10 | for (int i = 1; i < s.size(); i++)
| ~~^~~~~~~~~~
foo.cc:12:26: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
12 | if (s[i] = ',')
foo.cc:19:43: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
19 | for (int i = 0; i < st.size(); i++)
| ~~^~~~~~~~~~~
foo.cc:19:25: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
19 | for (int i = 0; i < st.size(); i++)
| ^~~
foo.cc:26:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
26 | sum += lower + upper + digit;
| ^~~