From bc712e752579c5e42b788e0fb3655915ae410c38 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 10 Aug 2014 17:16:21 +0200 Subject: [PATCH] Fix format-related warnings during build of jam. --- jam/execunix.c | 2 +- jam/expand.c | 2 +- jam/hash.c | 2 +- jam/hcache.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jam/execunix.c b/jam/execunix.c index 62176d3b8c..7e93603b9f 100644 --- a/jam/execunix.c +++ b/jam/execunix.c @@ -297,7 +297,7 @@ execwait() break; if( i == MAXJOBS ) - printf( "jam: waif child process %ld found, ignoring it!\n", w ); + printf( "jam: waif child process %d found, ignoring it!\n", w ); } while( i == MAXJOBS ); # ifdef USE_EXECNT diff --git a/jam/expand.c b/jam/expand.c index 68f8826034..aca9137a30 100644 --- a/jam/expand.c +++ b/jam/expand.c @@ -81,7 +81,7 @@ var_expand( int depth; if( DEBUG_VAREXP ) - printf( "expand '%.*s'\n", end - in, in ); + printf( "expand '%.*s'\n", (int)(end - in), in ); /* This gets alot of cases: $(<) and $(>) */ diff --git a/jam/hash.c b/jam/hash.c index 015181c0e1..c3c5851172 100644 --- a/jam/hash.c +++ b/jam/hash.c @@ -252,6 +252,6 @@ hashstat( struct hash *hp ) hp->items.nel, hp->tab.nel, hp->items.nel * hp->items.size / 1024, - hp->tab.nel * sizeof( ITEM ** ) / 1024, + (int)(hp->tab.nel * sizeof( ITEM ** ) / 1024), (float)count / (float)sets ); } diff --git a/jam/hcache.c b/jam/hcache.c index fec4f2c7ef..ee9a9e1a0e 100644 --- a/jam/hcache.c +++ b/jam/hcache.c @@ -313,10 +313,10 @@ hcache_done() else if (c->age > maxage) continue; - sprintf(includes_count_str, "%lu", list_length(c->includes)); - sprintf(hdrscan_count_str, "%lu", list_length(c->hdrscan)); + sprintf(includes_count_str, "%u", list_length(c->includes)); + sprintf(hdrscan_count_str, "%u", list_length(c->hdrscan)); sprintf(time_str, "%lu", c->time); - sprintf(age_str, "%lu", c->age); + sprintf(age_str, "%u", c->age); write_netstring(f, CACHE_RECORD_HEADER); write_netstring(f, c->boundname);