From: Joel Rosdahl Date: Mon, 5 Mar 2012 21:31:04 +0000 (+0100) Subject: Portability fixes X-Git-Tag: v3.2~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e76bdd30c116933eaeefeee480ae91210a9147f;p=thirdparty%2Fccache.git Portability fixes --- diff --git a/conf.c b/conf.c index ea052db57..24558cb91 100644 --- a/conf.c +++ b/conf.c @@ -219,15 +219,15 @@ handle_conf_setting(struct conf *conf, const char *key, const char *value, * Special rule for boolean settings from the environment: any value means * true. */ - bool *value = (bool *)((void *)conf + item->offset); + bool *value = (bool *)((char *)conf + item->offset); *value = !negate_boolean; goto out; } - if (!item->parser(value, (void *)conf + item->offset, errmsg)) { + if (!item->parser(value, (char *)conf + item->offset, errmsg)) { return false; } - if (item->verifier && !item->verifier((void *)conf + item->offset, errmsg)) { + if (item->verifier && !item->verifier((char *)conf + item->offset, errmsg)) { return false; } diff --git a/stats.c b/stats.c index 9853d2e6a..a43d39c7b 100644 --- a/stats.c +++ b/stats.c @@ -49,7 +49,7 @@ static void display_size_times_1024(uint64_t size); static struct { enum stats stat; char *message; - void (*fn)(size_t ); + void (*fn)(uint64_t); unsigned flags; } stats_info[] = { { STATS_CACHEHIT_DIR, "cache hit (direct) ", NULL, FLAG_ALWAYS },