summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-04-21 22:25:39 -0400
committerTavian Barnes <tavianator@gmail.com>2011-04-21 22:25:39 -0400
commitf055b64c58b9ce96a59da99e8f388d63aa4b0244 (patch)
treea35aaffba5e073634753525b72e84fb28b2dfc62 /libdimension
parent9cc3fef27ba1c23b2b935b6f81cf15dc9159fe3a (diff)
downloaddimension-f055b64c58b9ce96a59da99e8f388d63aa4b0244.tar.xz
Fix up some compiler warnings.
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/dictionary.c6
1 files changed, 3 insertions, 3 deletions
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) {