From f055b64c58b9ce96a59da99e8f388d63aa4b0244 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 21 Apr 2011 22:25:39 -0400 Subject: Fix up some compiler warnings. --- libdimension/dictionary.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libdimension/dictionary.c') diff --git a/libdimension/dictionary.c b/libdimension/dictionary.c index 83efe1d..ea6bbdc 100644 --- a/libdimension/dictionary.c +++ b/libdimension/dictionary.c @@ -88,7 +88,7 @@ dmnsn_dictionary_at(const dmnsn_dictionary *dict, const char *key) return dict->value; } else { dmnsn_dictionary **first = dmnsn_array_first(dict->children), **subtrie; - size_t size = dmnsn_array_size(dict->children); + ptrdiff_t size = dmnsn_array_size(dict->children); for (subtrie = first; subtrie - first < size; ++subtrie) { len = strlen((*subtrie)->prefix); if (strncmp(key, (*subtrie)->prefix, len) == 0) { @@ -144,7 +144,7 @@ dmnsn_dictionary_insert(dmnsn_dictionary *dict, const char *key, } else if (*prefix == '\0') { /* Partial match; key starts with prefix */ dmnsn_dictionary **first = dmnsn_array_first(dict->children), **subtrie; - size_t size = dmnsn_array_size(dict->children); + ptrdiff_t size = dmnsn_array_size(dict->children); for (subtrie = first; subtrie - first < size; ++subtrie) { if ((*subtrie)->prefix[0] == key[0]) { dict = *subtrie; @@ -203,7 +203,7 @@ dmnsn_dictionary_remove(dmnsn_dictionary *dict, const char *key) return true; } else { dmnsn_dictionary **first = dmnsn_array_first(dict->children), **subtrie; - size_t size = dmnsn_array_size(dict->children); + ptrdiff_t size = dmnsn_array_size(dict->children); for (subtrie = first; subtrie - first < size; ++subtrie) { len = strlen((*subtrie)->prefix); if (strncmp(key, (*subtrie)->prefix, len) == 0) { -- cgit v1.2.3