features: fix -Wshorten-64-to-32 warnings

Ticket: #6186
pull/11454/head
Philippe Antoine 8 months ago committed by Victor Julien
parent b5140c43ca
commit 9c0875b2a4

@ -42,9 +42,9 @@ static uint32_t FeatureHashFunc(HashListTable *ht, void *data,
{ {
FeatureEntryType *f = (FeatureEntryType *)data; FeatureEntryType *f = (FeatureEntryType *)data;
uint32_t hash = 0; uint32_t hash = 0;
int len = strlen(f->feature); size_t len = strlen(f->feature);
for (int i = 0; i < len; i++) for (size_t i = 0; i < len; i++)
hash += u8_tolower((unsigned char)f->feature[i]); hash += u8_tolower((unsigned char)f->feature[i]);
return (hash % ht->array_size); return (hash % ht->array_size);
@ -55,8 +55,8 @@ static char FeatureHashCompareFunc(void *data1, uint16_t datalen1,
{ {
FeatureEntryType *f1 = (FeatureEntryType *)data1; FeatureEntryType *f1 = (FeatureEntryType *)data1;
FeatureEntryType *f2 = (FeatureEntryType *)data2; FeatureEntryType *f2 = (FeatureEntryType *)data2;
int len1 = 0; size_t len1 = 0;
int len2 = 0; size_t len2 = 0;
if (f1 == NULL || f2 == NULL) if (f1 == NULL || f2 == NULL)
return 0; return 0;

Loading…
Cancel
Save