OSDN Git Service

Cppcheck: Unsigned expression 'pos=str_pos(name,codes[i].name)' can't be negative...
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 6 May 2020 13:33:59 +0000 (22:33 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Wed, 6 May 2020 13:33:59 +0000 (22:33 +0900)
Externals/crystaledit/editlib/utils/cs2cs.cpp

index de9af49..5a8157f 100644 (file)
@@ -110,7 +110,7 @@ skip_word (LPCTSTR s)
 ptrdiff_t
 get_coding (LPCTSTR name, type_codes *codes, int *coding)
 {
-  size_t pos;
+  ptrdiff_t pos;
   for (int i = 0; i < codes_count; i++)
     if ((pos = str_pos (name, codes[i].name)) >= 0)
       {