foo.cc: In function 'void GetStatSample(std::string&, std::vector<std::__cxx11::basic_string<char> >&)':
foo.cc:23:13: warning: unused variable 'nBaseIndex' [-Wunused-variable]
23 | int nBaseIndex = 0, nStartIndex = 0, nEndIndex = 0;
| ^~~~~~~~~~
foo.cc: In function 'void GetStatResult(std::vector<std::__cxx11::basic_string<char> >&, std::vector<StatUnit>&)':
foo.cc:58:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | for (i = 0; i < vtSampleSpace.size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:62:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<StatUnit>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
62 | for (j = 0; j < vtStatResult.size(); j++)
| ~~^~~~~~~~~~~~~~~~~~~~~
foo.cc:84:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<StatUnit>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
84 | if (j == vtStatResult.size())
| ~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'int main(int, char**)':
foo.cc:98:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
98 | gets(ary_cInstance);
| ~~~~^~~~~~~~~~~~~~~
In file included from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/cstdio:42,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/ext/string_conversions.h:43,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/basic_string.h:3968,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/string:53,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/locale_classes.h:40,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:41,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/ios:42,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/ostream:38,
from iostream:39:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
foo.cc:116:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<StatUnit>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
116 | for (i = 0; i < vtStatResult.size(); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~
foo.cc:119:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
119 | for (j = 0; j < vtStatResult.at(i).entity.size(); j++)
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:127:24: warning: 'void operator delete(void*)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
127 | delete strInput;
| ^~~~~~~~
foo.cc:118:73: note: returned from 'void* operator new [](std::size_t)'
118 | strInput = new char[vtStatResult.at(i).entity.size() + 1];
| ^
/nix/store/74y3751gsixaz9797ib0hp7c658sp1y5-binutils-2.40/bin/ld: /tmp/cc4KykwU.o: in function `main':
foo.cc:(.text.startup+0x18): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务