Ticket #2207: jam-wall-clean.patch
File jam-wall-clean.patch, 15.8 KB (added by , 14 years ago) |
---|
-
tools/jam/src/builtins.c
old new 157 157 builtin_flags, T_FLAG_TEMP, 0 ) ); 158 158 159 159 { 160 char * args[] = { "targets", "*", 0 };161 160 bind_builtin( 162 161 "ISFILE", 163 162 builtin_flags, T_FLAG_ISFILE, 0 ); … … 1157 1156 void backtrace( FRAME *frame ) 1158 1157 { 1159 1158 if ( !frame ) return; 1160 while ( frame = frame->prev)1159 while ( ( frame = frame->prev ) ) 1161 1160 { 1162 1161 backtrace_line( frame ); 1163 1162 } … … 1368 1367 *(current+2) = '\1'; 1369 1368 ++dotdots; 1370 1369 } else if (dotdots) { 1371 char* p = current;1372 1370 memset(current, '\1', end-current+1); 1373 1371 --dotdots; 1374 1372 } -
tools/jam/src/class.c
old new 52 52 RULE* ir2; 53 53 struct import_base_data* d = (struct import_base_data*)d_; 54 54 string qualified_name[1]; 55 int basename_lenght = strlen(d->base_name)+1;56 55 57 56 string_new(qualified_name); 58 57 string_append(qualified_name, d->base_name); … … 67 66 68 67 /* If we're importing class method, localize it. */ 69 68 if (r->module == d->base_module 70 || r->module->class_module && r->module->class_module == d->base_module) {69 || ( r->module->class_module && r->module->class_module == d->base_module ) ) { 71 70 ir1->module = ir2->module = d->class_module; 72 71 } 73 72 … … 107 106 printf("Class %s already defined\n", xname->string); 108 107 abort(); 109 108 } else { 110 hashenter(classes, (HASHDATA**)&pp);109 (void)hashenter(classes, (HASHDATA**)&pp); 111 110 } 112 111 check_defined(bases); 113 112 -
tools/jam/src/compile.c
old new 326 326 { 327 327 LIST *r = 0; 328 328 LIST *l; 329 while ( l = parse_evaluate( p->left, frame) )329 while ( ( l = parse_evaluate( p->left, frame ) ) ) 330 330 { 331 331 list_free( l ); 332 332 if( r ) list_free( r ); … … 800 800 return locals; 801 801 } 802 802 803 static int python_instance_number = 0;804 805 803 RULE * 806 804 enter_rule( char *rulename, module_t *target_module ); 807 805 808 806 #ifdef HAVE_PYTHON 807 808 static int python_instance_number = 0; 809 809 810 static LIST* 810 811 call_python_function(RULE* r, FRAME* frame) 811 812 { -
tools/jam/src/debug.c
old new 111 111 profile_total.cumulative += p->net; 112 112 profile_total.memory += p->memory; 113 113 } 114 printf("%10 d %12.6f %12.6f %12.8f %10d %10d %s\n",114 printf("%10ld %12.6f %12.6f %12.8f %10ld %10ld %s\n", 115 115 p->num_entries, 116 116 cumulative,net,q, 117 117 p->memory, mem_each, -
tools/jam/src/expand.c
# # Pointer difference is long int on amd64; cast to int
old new 87 87 int depth; 88 88 89 89 if( DEBUG_VAREXP ) 90 printf( "expand '%.*s'\n", end - in, in );90 printf( "expand '%.*s'\n", (int) (end - in), in ); 91 91 92 92 /* This gets alot of cases: $(<) and $(>) */ 93 93 … … 276 276 string_copy( variable, vars->string ); 277 277 varname = variable->value; 278 278 279 if( colon = strchr( varname, MAGIC_COLON) )279 if( ( colon = strchr( varname, MAGIC_COLON ) ) ) 280 280 { 281 281 string_truncate( variable, colon - varname ); 282 282 var_edit_parse( colon + 1, &edits ); … … 285 285 /* Look for [x-y] subscripting */ 286 286 /* sub1 and sub2 are x and y. */ 287 287 288 if ( bracket = strchr( varname, MAGIC_LEFT) )288 if ( ( bracket = strchr( varname, MAGIC_LEFT ) ) ) 289 289 { 290 290 /* 291 291 ** Make all syntax errors in [] subscripting … … 607 607 fp->ptr = ""; 608 608 fp->len = 0; 609 609 } 610 else if( p = strchr( mods, MAGIC_COLON) )610 else if( ( p = strchr( mods, MAGIC_COLON ) ) ) 611 611 { 612 612 *p = 0; 613 613 fp->ptr = ++mods; -
tools/jam/src/fileunix.c
old new 170 170 printf( "scan directory %s\n", dir ); 171 171 172 172 string_new( filename ); 173 while( dirent = readdir( dd) )173 while( ( dirent = readdir( dd ) ) ) 174 174 { 175 file_info_t * ff = 0;176 177 175 # ifdef old_sinix 178 176 /* Broken structure definition on sinix. */ 179 177 f.f_base.ptr = dirent->d_name - 2; -
tools/jam/src/hash.c
# # Hunk 3: sizeof( ITEM ** ) is long unsigned int on amd64 and s390 # cast to int.
old new 336 336 hp->items.size = sizeof( struct hashhdr ) + ALIGNED( datalen ); 337 337 hp->items.list = -1; 338 338 hp->items.nel = 0; 339 hp->inel = /* */ 11 /* / 47 /**/;339 hp->inel = /* */ 11 /* 47 */; 340 340 hp->name = name; 341 341 342 342 return hp; … … 412 412 413 413 for( i = nel; i > 0; i-- ) 414 414 { 415 if( here = ( *tab++ != (ITEM *)0) )415 if( ( here = ( *tab++ != (ITEM *)0 ) ) ) 416 416 count++; 417 417 if( here && !run ) 418 418 sets++; … … 425 425 hp->items.nel, 426 426 hp->tab.nel, 427 427 hp->items.nel * hp->items.size / 1024, 428 hp->tab.nel * sizeof( ITEM ** ) / 1024,428 hp->tab.nel * (int) sizeof( ITEM ** ) / 1024, 429 429 (float)count / (float)sets ); 430 430 } -
tools/jam/src/hdrmacro.c
old new 46 46 * just to invoke a rule. 47 47 */ 48 48 49 static LIST *header_macros1( LIST *l, char *file, int rec, regexp *re[] );50 51 49 /* this type is used to store a dictionary of file header macros */ 52 50 typedef struct header_macro 53 51 { -
tools/jam/src/jam.c
old new 308 308 309 309 /* Turn on/off debugging */ 310 310 311 for( n = 0; s = getoptval( optv, 'd', n); n++ )311 for( n = 0; ( s = getoptval( optv, 'd', n ) ); n++ ) 312 312 { 313 313 int i; 314 314 … … 426 426 427 427 /* Load up variables set on command line. */ 428 428 429 for( n = 0; s = getoptval( optv, 's', n); n++ )429 for( n = 0; ( s = getoptval( optv, 's', n ) ); n++ ) 430 430 { 431 431 char *symv[2]; 432 432 symv[0] = s; … … 469 469 { 470 470 FRAME frame[1]; 471 471 frame_init( frame ); 472 for( n = 0; s = getoptval( optv, 'f', n); n++ )472 for( n = 0; ( s = getoptval( optv, 'f', n ) ); n++ ) 473 473 parse_file( s, frame ); 474 474 475 475 if( !n ) … … 480 480 481 481 /* Manually touch -t targets */ 482 482 483 for( n = 0; s = getoptval( optv, 't', n); n++ )483 for( n = 0; ( s = getoptval( optv, 't', n ) ); n++ ) 484 484 touchtarget( s ); 485 485 486 486 /* If an output file is specified, set globs.cmdout to that */ 487 487 488 if( s = getoptval( optv, 'o', 0) )488 if( ( s = getoptval( optv, 'o', 0 ) ) ) 489 489 { 490 490 if( !( globs.cmdout = fopen( s, "w" ) ) ) 491 491 { -
tools/jam/src/make.c
old new 201 201 if (DEBUG_FATE) 202 202 { 203 203 printf( "fate change %s from %s to %s (as dependent of %s)\n", 204 p->name, target_fate[ fate0], target_fate[p->fate], t->name);204 p->name, target_fate[(int)fate0], target_fate[(int)p->fate], t->name); 205 205 } 206 206 207 207 /* If we're done visiting it, go back and make sure its … … 226 226 { 227 227 if (DEBUG_FATE) 228 228 printf( "fate change %s from %s to %s (by rebuild)\n", 229 r->name, target_fate[ r->fate], target_fate[T_FATE_REBUILD]);229 r->name, target_fate[(int)r->fate], target_fate[(int)T_FATE_REBUILD]); 230 230 231 231 /* Force rebuild it */ 232 232 r->fate = T_FATE_REBUILD; … … 251 251 COUNTS *counts, /* for reporting */ 252 252 int anyhow ) /* forcibly touch all (real) targets */ 253 253 { 254 TARGETS *c, * d, *incs;254 TARGETS *c, *incs; 255 255 TARGET *ptime = t; 256 256 time_t last, leaf, hlast; 257 257 int fate; … … 365 365 case T_BIND_MISSING: 366 366 case T_BIND_PARENTS: 367 367 printf( "time\t--\t%s%s: %s\n", 368 spaces( depth ), t->name, target_bind[ t->binding ] );368 spaces( depth ), t->name, target_bind[ (int)t->binding ] ); 369 369 break; 370 370 371 371 case T_BIND_EXISTS: … … 447 447 if( fate < c->target->fate ) 448 448 printf( "fate change %s from %s to %s by dependency %s\n", 449 449 t->name, 450 target_fate[ fate], target_fate[c->target->fate],450 target_fate[(int)fate], target_fate[(int)c->target->fate], 451 451 c->target->name); 452 452 #endif 453 453 … … 571 571 fate = T_FATE_STABLE; 572 572 } 573 573 #ifdef OPT_GRAPH_DEBUG_EXT 574 if( DEBUG_FATE && fate != savedFate ) 574 if( DEBUG_FATE && ( fate != savedFate ) ) 575 { 575 576 if( savedFate == T_FATE_STABLE ) 576 577 printf( "fate change %s set to %s%s\n", 577 578 t->name, target_fate[fate], … … 580 581 printf( "fate change %s from %s to %s%s\n", 581 582 t->name, target_fate[savedFate], target_fate[fate], 582 583 oldTimeStamp ? " (by timestamp)" : "" ); 584 } 583 585 #endif 584 586 585 587 /* Step 4e: handle missing files */ … … 667 669 668 670 if( DEBUG_MAKEPROG ) 669 671 printf( "made%s\t%s\t%s%s\n", 670 flag, target_fate[t->fate ],672 flag, target_fate[ (int)t->fate ], 671 673 spaces( depth ), t->name ); 672 674 673 675 /* We don't have DEBUG_CAUSES. … … 776 778 for( c = t->depends; c; c = c->next ) 777 779 { 778 780 printf( " %s : Depends on %s (%s)", spaces(depth), 779 target_name(c->target), target_fate[c->target->fate ] );781 target_name(c->target), target_fate[ (int)c->target->fate ] ); 780 782 if (c->target->time == t->time) 781 783 printf( " (max time)"); 782 784 printf("\n"); -
tools/jam/src/make1.c
old new 65 65 66 66 # include <stdlib.h> 67 67 68 #if defined(sun) || defined(__sun) 68 #if defined(sun) || defined(__sun) || defined(linux) 69 69 #include <unistd.h> /* for unlink */ 70 70 #endif 71 71 … … 506 506 { 507 507 char *rule_name = 0; 508 508 char *target = 0; 509 510 ! ( cmd->rule->actions->flags & RULE_QUIETLY ) && DEBUG_MAKE)509 if( DEBUG_MAKEQ || 510 ( ! ( cmd->rule->actions->flags & RULE_QUIETLY ) && DEBUG_MAKE ) ) 511 511 { 512 513 514 515 516 517 512 rule_name = cmd->rule->name; 513 target = lol_get(&cmd->args, 0)->string; 514 if ( globs.noexec ) 515 { 516 out_action(rule_name,target,cmd->buf,"","",EXIT_OK); 517 } 518 518 } 519 519 520 520 if( globs.noexec ) -
tools/jam/src/modules.c
old new 135 135 char* s = module_names->string; 136 136 char** ss = &s; 137 137 138 hashenter(h, (HASHDATA**)&ss);138 (void)hashenter(h, (HASHDATA**)&ss); 139 139 } 140 140 141 141 PROFILE_EXIT(IMPORT_MODULE); -
tools/jam/src/modules/order.c
old new 77 77 LIST* arg = lol_get( frame->args, 0 ); 78 78 LIST* tmp; 79 79 LIST* result = 0; 80 int src , dst;80 int src; 81 81 82 82 /* We need to create a graph of order dependencies between 83 83 the passed objects. We assume that there are no duplicates -
tools/jam/src/modules/property-set.c
old new 45 45 { 46 46 LIST* properties = lol_get( frame->args, 0 ); 47 47 LIST* sorted = 0; 48 #if 0 48 49 LIST* order_sensitive = 0; 50 #endif 49 51 LIST* unique; 50 52 LIST* tmp; 51 53 LIST* val; -
tools/jam/src/native.c
old new 32 32 } 33 33 n.procedure = parse_make( f, P0, P0, P0, C0, C0, 0 ); 34 34 n.version = version; 35 hashenter(m->native_rules, (HASHDATA**)&np);35 (void)hashenter(m->native_rules, (HASHDATA**)&np); 36 36 } 37 37 } 38 38 -
tools/jam/src/output.c
old new 67 67 if ( action ) 68 68 { 69 69 /* but only output for non-quietly actions */ 70 fprintf(bjam_out, "% d second time limit exceeded\n", globs.timeout);70 fprintf(bjam_out, "%ld second time limit exceeded\n", globs.timeout); 71 71 } 72 72 break; 73 73 } -
tools/jam/src/pathunix.c
old new 124 124 p = 0; 125 125 q = file; 126 126 127 while( q = (char *)memchr( q, '.', end - q) )127 while( ( q = (char *)memchr( q, '.', end - q ) ) ) 128 128 p = q++; 129 129 130 130 if( p ) -
tools/jam/src/rules.c
old new 342 342 TARGETS *chain, 343 343 TARGETS *targets ) 344 344 { 345 TARGETS *c;346 347 345 if( !targets ) 348 346 return chain; 349 347 else if( !chain ) -
tools/jam/src/search.c
old new 115 115 f->f_grist.ptr = 0; 116 116 f->f_grist.len = 0; 117 117 118 if( varlist = var_get( "LOCATE") )118 if( ( varlist = var_get( "LOCATE" ) ) ) 119 119 { 120 120 f->f_root.ptr = varlist->string; 121 121 f->f_root.len = strlen( varlist->string ); … … 130 130 timestamp( buf->value, time ); 131 131 found = 1; 132 132 } 133 else if( varlist = var_get( "SEARCH") )133 else if( ( varlist = var_get( "SEARCH" ) ) ) 134 134 { 135 135 while( varlist ) 136 136 { … … 198 198 /* CONSIDER: we probably should issue a warning is another file 199 199 is explicitly bound to the same location. This might break 200 200 compatibility, though. */ 201 hashenter(explicit_bindings, (HASHDATA**)&ba);201 (void)hashenter(explicit_bindings, (HASHDATA**)&ba); 202 202 } 203 203 204 204 /* prepare a call to BINDRULE if the variable is set */ -
tools/jam/src/timestamp.c
old new 75 75 PATHNAME f1, f2; 76 76 BINDING binding, *b = &binding; 77 77 string buf[1]; 78 string path;79 char *p;80 78 81 79 # ifdef DOWNSHIFT_PATHS 80 string path; 81 char *p; 82 82 83 83 string_copy( &path, target ); 84 84 p = path.value; -
tools/jam/src/variable.c
old new 109 109 110 110 if( ( val = strchr( *e, '=' ) ) || ( val = *e + strlen( *e ) ) ) 111 111 # else 112 if( val = strchr( *e, '=') )112 if( ( val = strchr( *e, '=' ) ) ) 113 113 # endif 114 114 { 115 115 LIST *l = L0; -
tools/jam/src/hcache.c
old new 162 162 { 163 163 if (!s) 164 164 s = ""; 165 fprintf(f, "% lu\t%s\n", strlen(s), s);165 fprintf(f, "%zu\t%s\n", strlen(s), s); 166 166 } 167 167 168 168 void … … 314 314 else if (c->age > maxage) 315 315 continue; 316 316 317 sprintf(includes_count_str, "% lu", list_length(c->includes));318 sprintf(hdrscan_count_str, "% lu", list_length(c->hdrscan));317 sprintf(includes_count_str, "%d", list_length(c->includes)); 318 sprintf(hdrscan_count_str, "%d", list_length(c->hdrscan)); 319 319 sprintf(time_str, "%lu", c->time); 320 sprintf(age_str, "% lu", c->age);320 sprintf(age_str, "%d", c->age); 321 321 322 322 write_netstring(f, CACHE_RECORD_HEADER); 323 323 write_netstring(f, c->boundname); -
tools/jam/src/headers.c
old new 60 60 { 61 61 LIST *hdrscan; 62 62 LIST *hdrrule; 63 LIST *headlist = 0;64 63 regexp *re[ MAXINC ]; 65 64 int rec = 0; 66 65 … … 88 87 #ifdef OPT_HEADER_CACHE_EXT 89 88 lol_add( frame->args, hcache( t, rec, re, hdrscan ) ); 90 89 #else 91 lol_add( frame->args, headers1( headlist, t->boundname, rec, re ) ); 90 { 91 LIST *headlist = 0; 92 lol_add( frame->args, headers1( headlist, t->boundname, rec, re ) ); 93 } 92 94 #endif 93 95 94 96 if( lol_get( frame->args, 1 ) ) -
tools/jam/src/regexp.c
old new 307 307 register char *ret; 308 308 register char *br; 309 309 register char *ender; 310 register int parno ;310 register int parno = 0; 311 311 int flags; 312 312 313 313 *flagp = HASWIDTH; /* Tentatively. */