{
if(!*t) {
(*t) = rfx_calloc(sizeof(trielayer_t));
- (*t)->rest = (unsigned char*)strdup(id);
+ (*t)->rest = (unsigned char*)strdup((char*)id);
(*t)->data = data;
return 0;
}
char overwrite = 0;
if((*t)->rest)
overwrite = 1;
- (*t)->rest = strdup("");
+ (*t)->rest = (unsigned char*)strdup("");
(*t)->data = data;
return overwrite;
}
static char _trie_remove(trielayer_t*t, unsigned const char*id)
{
while(t) {
- if(t->rest && !strcmp(t->rest, id)) {
+ if(t->rest && !strcmp((char*)t->rest, (char*)id)) {
free(t->rest);
t->rest = 0;
return 1;
{
trielayer_t*t = trie->start;
while(t) {
- if(t->rest && !strcmp(t->rest, id))
+ if(t->rest && !strcmp((char*)t->rest, (char*)id))
return 1;
if(!*id)
return 0;
{
trielayer_t*t = trie->start;
while(t) {
- if(t->rest && !strcmp(t->rest, id))
+ if(t->rest && !strcmp((char*)t->rest, (char*)id))
return t->data;
if(!*id)
return 0;
}
if(t->rest) {
buffer[pos]=0;
- printf("%s%s %08x\n", buffer, t->rest, t->data);
+ printf("%s%s %08x\n", buffer, t->rest, (int)t->data);
}
}
dictentry_t*e = h->slots[t];
while(e) {
if(h->key_type!=&charptr_type) {
- fprintf(fi, "%s%08x=%08x\n", prefix, e->key, e->data);
+ fprintf(fi, "%s%08x=%08x\n", prefix, (int)e->key, (int)e->data);
} else {
- fprintf(fi, "%s%s=%08x\n", prefix, e->key, e->data);
+ fprintf(fi, "%s%s=%08x\n", prefix, (char*)e->key, (int)e->data);
}
e = e->next;
}
static void dumpmapentry(void*data, const void*key, void*value)
{
FILE*fi = (FILE*)data;
- fprintf(fi, "%s=%s\n", key, (char*)value);
+ fprintf(fi, "%s=%s\n", (char*)key, (char*)value);
}
void map_dump(map_t*map, FILE*fi, const char*prefix)
{