estraier / tkrzw

a set of implementations of DBM
Apache License 2.0
164 stars 20 forks source link

Little warning (0.1.27) #42

Open tieugene opened 1 year ago

tieugene commented 1 year ago
tkrzw_compress.cc:486:14: warning: comparison of integer expressions of different signedness: 'const int32_t' {aka 'const int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  486 |     if (vidx < key_.size()) {
      |         ~~~~~^~~~~~~~~~~~~
tkrzw_compress.cc: In member function 'virtual char* tkrzw::RC4Compressor::Decompress(const void*, size_t, size_t*) const':
tkrzw_compress.cc:530:14: warning: comparison of integer expressions of different signedness: 'const int32_t' {aka 'const int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  530 |     if (vidx < key_.size()) {
      |         ~~~~~^~~~~~~~~~~~~
estraier commented 1 year ago

Thanks. I changed the type to size_t to suppress the warnings.