From 5e76bdd30c116933eaeefeee480ae91210a9147f Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 5 Mar 2012 22:31:04 +0100 Subject: [PATCH] Portability fixes --- conf.c | 6 +++--- stats.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 }, -- 2.47.3