summaryrefslogtreecommitdiffstats
path: root/src/dictionary.c
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-06-11 22:26:17 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-06-11 22:26:17 +0300
commit56529fd082e321b1ea82cf3b6eef3795dc073b6d (patch)
tree8549c73a0fa5d0c1d3d18dc32006513e73369471 /src/dictionary.c
parent51f7287f1e3061296e309b000bddb3dddce33dc8 (diff)
added gcc printf checking to debug(), error(), fatal(), info(), web_sprintf() and fixed all the occurences reported by the compiler
Diffstat (limited to 'src/dictionary.c')
-rw-r--r--src/dictionary.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dictionary.c b/src/dictionary.c
index 3b9e8a90be..8dbbc64c4f 100644
--- a/src/dictionary.c
+++ b/src/dictionary.c
@@ -90,14 +90,14 @@ static NAME_VALUE *dictionary_name_value_create_nolock(DICTIONARY *dict, const c
debug(D_DICTIONARY, "Creating name value entry for name '%s'.", name);
NAME_VALUE *nv = calloc(1, sizeof(NAME_VALUE));
- if(unlikely(!nv)) fatal("Cannot allocate name_value of size %z", sizeof(NAME_VALUE));
+ if(unlikely(!nv)) fatal("Cannot allocate name_value of size %zu", sizeof(NAME_VALUE));
if(dict->flags & DICTIONARY_FLAG_NAME_LINK_DONT_CLONE)
nv->name = (char *)name;
else {
nv->name = strdup(name);
if (unlikely(!nv->name))
- fatal("Cannot allocate name_value.name of size %z", strlen(name));
+ fatal("Cannot allocate name_value.name of size %zu", strlen(name));
}
nv->hash = (hash)?hash:simple_hash(nv->name);
@@ -107,7 +107,7 @@ static NAME_VALUE *dictionary_name_value_create_nolock(DICTIONARY *dict, const c
else {
nv->value = malloc(value_len);
if (unlikely(!nv->value))
- fatal("Cannot allocate name_value.value of size %z", value_len);
+ fatal("Cannot allocate name_value.value of size %zu", value_len);
memcpy(nv->value, value, value_len);
}
@@ -215,7 +215,7 @@ void *dictionary_set(DICTIONARY *dict, const char *name, void *value, size_t val
*old = nv->value;
if(unlikely(!nv->value))
- fatal("Cannot allocate value of size %z", value_len);
+ fatal("Cannot allocate value of size %zu", value_len);
memcpy(value, value, value_len);
nv->value = value;