File boost-jam-codecleanup.diff of Package boost-jam
--- debug.c
+++ debug.c
@@ -111,7 +111,7 @@
profile_total.cumulative += p->net;
profile_total.memory += p->memory;
}
- printf("%10d %12.6f %12.6f %12.8f %10d %10d %s\n",
+ printf("%10ld %12.6f %12.6f %12.8f %10ld %10ld %s\n",
p->num_entries,
cumulative,net,q,
p->memory, mem_each,
--- expand.c
+++ expand.c
@@ -87,7 +87,7 @@
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 $(>) */
@@ -276,7 +276,7 @@
string_copy( variable, vars->string );
varname = variable->value;
- if( colon = strchr( varname, MAGIC_COLON ) )
+ if( ( colon = strchr( varname, MAGIC_COLON ) ) )
{
string_truncate( variable, colon - varname );
var_edit_parse( colon + 1, &edits );
@@ -285,7 +285,7 @@
/* Look for [x-y] subscripting */
/* sub1 and sub2 are x and y. */
- if ( bracket = strchr( varname, MAGIC_LEFT ) )
+ if ( ( bracket = strchr( varname, MAGIC_LEFT ) ) )
{
/*
** Make all syntax errors in [] subscripting
@@ -607,7 +607,7 @@
fp->ptr = "";
fp->len = 0;
}
- else if( p = strchr( mods, MAGIC_COLON ) )
+ else if( ( p = strchr( mods, MAGIC_COLON ) ) )
{
*p = 0;
fp->ptr = ++mods;
--- hash.c
+++ hash.c
@@ -412,7 +412,7 @@
for( i = nel; i > 0; i-- )
{
- if( here = ( *tab++ != (ITEM *)0 ) )
+ if( ( here = ( *tab++ != (ITEM *)0 ) ) )
count++;
if( here && !run )
sets++;
@@ -425,6 +425,6 @@
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 );
}
--- jam.c
+++ jam.c
@@ -308,7 +308,7 @@
/* Turn on/off debugging */
- for( n = 0; s = getoptval( optv, 'd', n ); n++ )
+ for( n = 0; ( s = getoptval( optv, 'd', n ) ); n++ )
{
int i;
@@ -426,7 +426,7 @@
/* Load up variables set on command line. */
- for( n = 0; s = getoptval( optv, 's', n ); n++ )
+ for( n = 0; ( s = getoptval( optv, 's', n ) ); n++ )
{
char *symv[2];
symv[0] = s;
@@ -469,7 +469,7 @@
{
FRAME frame[1];
frame_init( frame );
- for( n = 0; s = getoptval( optv, 'f', n ); n++ )
+ for( n = 0; ( s = getoptval( optv, 'f', n ) ); n++ )
parse_file( s, frame );
if( !n )
@@ -480,12 +480,12 @@
/* Manually touch -t targets */
- for( n = 0; s = getoptval( optv, 't', n ); n++ )
+ for( n = 0; ( s = getoptval( optv, 't', n ) ); n++ )
touchtarget( s );
/* If an output file is specified, set globs.cmdout to that */
- if( s = getoptval( optv, 'o', 0 ) )
+ if( ( s = getoptval( optv, 'o', 0 ) ) )
{
if( !( globs.cmdout = fopen( s, "w" ) ) )
{
--- make.c
+++ make.c
@@ -201,7 +201,7 @@
if (DEBUG_FATE)
{
printf( "fate change %s from %s to %s (as dependent of %s)\n",
- p->name, target_fate[fate0], target_fate[p->fate], t->name);
+ p->name, target_fate[(int)fate0], target_fate[(int)p->fate], t->name);
}
/* If we're done visiting it, go back and make sure its
@@ -226,7 +226,7 @@
{
if (DEBUG_FATE)
printf( "fate change %s from %s to %s (by rebuild)\n",
- r->name, target_fate[r->fate], target_fate[T_FATE_REBUILD]);
+ r->name, target_fate[(int)r->fate], target_fate[T_FATE_REBUILD]);
/* Force rebuild it */
r->fate = T_FATE_REBUILD;
@@ -365,7 +365,7 @@
case T_BIND_MISSING:
case T_BIND_PARENTS:
printf( "time\t--\t%s%s: %s\n",
- spaces( depth ), t->name, target_bind[ t->binding ] );
+ spaces( depth ), t->name, target_bind[ (int)t->binding ] );
break;
case T_BIND_EXISTS:
@@ -667,7 +667,7 @@
if( DEBUG_MAKEPROG )
printf( "made%s\t%s\t%s%s\n",
- flag, target_fate[ t->fate ],
+ flag, target_fate[ (int)t->fate ],
spaces( depth ), t->name );
/* We don't have DEBUG_CAUSES.
--- make1.c
+++ make1.c
@@ -65,7 +65,7 @@
# include <stdlib.h>
-#if defined(sun) || defined(__sun)
+#if defined(sun) || defined(__sun) || defined(__GLIBC__)
#include <unistd.h> /* for unlink */
#endif