Changeset 1864


Ignore:
Timestamp:
05/26/12 06:46:50 (12 months ago)
Author:
philmoz
Message:

Minor update to stop compiler warnings when building tools on 64 bit Linux.

Location:
trunk/tools
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/elf2flt/elf-arm.c

    r1527 r1864  
    5959                        if ( FLAG_DUMP_RELOC ) 
    6060                                printf( "R_ARM_ABS32: %p(%s+0x%x=%x): ptr=%x [%s+0x%x+0x%x] sym:%s\n",  
    61                                         (char*)base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
     61                                        base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
    6262                                        tgt_sect->base_addr + addend + sym->st_value, 
    6363                                        tgt_sect->name, sym->st_value, addend, symname 
     
    123123                          if ( FLAG_DUMP_RELOC ) 
    124124                        printf( "R_ARM_THM_CALL: %p(%s+0x%x=%x):  %04x %04x ptr=%x [loc%-d] sym:%s\n",  
    125                                         (char*)base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
     125                                        base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
    126126                                        upper, lower, 
    127127                                        tgt_sect->base_addr+rela->r_offset+offset, offset, 
     
    191191                          if ( FLAG_DUMP_RELOC ) { 
    192192                        printf( "%s: %p(%s+0x%x=%x):  %08x ptr=%x [loc%-d] sym:%s\n", reloc_name, 
    193                                         (char*)base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
     193                                        base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
    194194                                        *(uint32_t *)loc, 
    195195                                        base_sect->base_addr+rela->r_offset+offset*4, offset*4, 
     
    238238                if ( FLAG_DUMP_RELOC ) 
    239239                                printf( "R_ARM_ABS32: %p(%s+0x%x=%x): import_value=%d (sym:%s)+0x%x %d\n",  
    240                                         (char*)base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
     240                                        base_sect->base_addr+rela->r_offset,  base_sect->name, rela->r_offset, locoffset, 
    241241                                         importidx, symname, *(uint32_t*)loc, flat_import_count 
    242242                                                ); 
  • trunk/tools/elf2flt/elfflt.c

    r1577 r1864  
    745745 
    746746  int output_fd = open(fltfile,O_WRONLY|O_CREAT|O_TRUNC|O_BINARY,0777); 
    747   write(output_fd, flat_buf, flat->import_start); 
    748   write(output_fd, flat_import_buf, flat_import_count*sizeof(import_record_t)); 
     747  i = write(output_fd, flat_buf, flat->import_start); 
     748  i = write(output_fd, flat_import_buf, flat_import_count*sizeof(import_record_t)); 
    749749  close(output_fd); 
    750750 
  • trunk/tools/finsig_dryos.c

    • Property svn:eol-style set to native
    r1855 r1864  
    799799{ 
    800800    FILE *f = fopen(filename, "rb"); 
     801    int k; 
    801802 
    802803    if (f == NULL) 
     
    815816    // Allows sig matching past end of firmware without checking each time in the inner loop 
    816817    fw->buf = malloc((fw->size+32)*4); 
    817     fread(fw->buf, 4, fw->size, f); 
     818    k = fread(fw->buf, 4, fw->size, f); 
    818819    fclose(f); 
    819820         
     
    824825        // Get DRYOS version 
    825826        fw->dryos_ver = 0; 
    826         int k = find_str(fw, "DRYOS version 2.3, release #"); 
     827        k = find_str(fw, "DRYOS version 2.3, release #"); 
    827828        if (k == -1) 
    828829        { 
     
    14701471 
    14711472        ignore_names = malloc(size+1); 
    1472         fread(ignore_names, 1, size, f); 
     1473        size = fread(ignore_names, 1, size, f); 
    14731474        ignore_names[size] = 0; 
    14741475 
     
    24902491                if (opt == 1) return; 
    24912492                char fmt[50] = ""; 
    2492                 sprintf(fmt, "// ERROR: %%s is not found. %%%ds//--- --- ", 34-strlen(curr_name)); 
     2493                sprintf(fmt, "// ERROR: %%s is not found. %%%ds//--- --- ", (int)(34-strlen(curr_name))); 
    24932494                sprintf(line+strlen(line), fmt, curr_name, ""); 
    24942495        } 
  • trunk/tools/finsig_vxworks.c

    • Property svn:eol-style set to native
    r1660 r1864  
    138138    // Allows sig matching past end of firmware without checking each time in the inner loop 
    139139    buf=malloc((size+32)*4); 
    140     fread(buf, 4, size, f); 
     140    i = fread(buf, 4, size, f); 
    141141    fclose(f); 
    142142    memset(&buf[size],0xff,32*4); 
  • trunk/tools/gensig_dryos.c

    • Property svn:eol-style set to native
    r1291 r1864  
    293293 
    294294    fseek(f, pos, SEEK_SET); 
    295     fread(buf, 4, size, f); 
     295    i = fread(buf, 4, size, f); 
    296296 
    297297    for (i=0;i<size;++i){ 
  • trunk/tools/gensig_vxworks.c

    • Property svn:eol-style set to native
    r1291 r1864  
    298298 
    299299    fseek(f, pos, SEEK_SET); 
    300     fread(buf, 4, size, f); 
     300    i = fread(buf, 4, size, f); 
    301301 
    302302    printf("static FuncSig func_sig_%s[] = {\n",proc_name); 
  • trunk/tools/makeexport.c

    r1577 r1864  
    11#include <stdio.h> 
    22#include <stdlib.h> 
     3#include <unistd.h> 
    34#include <math.h> 
    45 
  • trunk/tools/makelang.c

    • Property svn:eol-style set to native
    r1395 r1864  
    11#include <stdio.h> 
    22#include <stdlib.h> 
     3#include <unistd.h> 
    34#include <math.h> 
    45 
Note: See TracChangeset for help on using the changeset viewer.