]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Portability fixes
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Mar 2012 21:31:04 +0000 (22:31 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 5 Mar 2012 21:31:04 +0000 (22:31 +0100)
conf.c
stats.c

diff --git a/conf.c b/conf.c
index ea052db577f53bcc4632dd471385d7cadc22caee..24558cb9198ee75880167d838ddc1e16eb677d16 100644 (file)
--- 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 9853d2e6a5d6bdf4016b00e9e0e908537149e413..a43d39c7baf847d956b29b1d476624bc43a22270 100644 (file)
--- 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 },