Explorar o código

test62: fix signedness in comparison

When compiled with -Wextra, a warning concerning the comparison of
integers with different signs is caused in function
TrivialHash. Changing the type of the index variable i to size_t fixes
this.
Olaf Bergmann %!s(int64=5) %!d(string=hai) anos
pai
achega
575c590f4c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tests/test62.c

+ 1 - 1
tests/test62.c

@@ -8,7 +8,7 @@
 unsigned int TrivialHash(const char *s, size_t len)
 {
     unsigned int h = 0;
-    int i;
+    size_t i;
     for (i=0; i < len; ++i) {
         h += (unsigned char)s[i];
     }