Ticket #254: remove-alignment-warning.patch

File remove-alignment-warning.patch, 1.0 KB (added by doughera, 13 years ago)
  • src/packfile.c

    old new  
    18651865    TRACE_PRINTF_ALIGN(("-S ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n", 
    18661866                        offs, self->pf->src, cursor)); 
    18671867    offs += PAD_16_B(offs); 
    1868     cursor = (const opcode_t *)((const char *)(self->pf->src) + offs); 
     1868    cursor = self->pf->src + offs/sizeof(opcode_t); 
    18691869    TRACE_PRINTF_ALIGN(("+S ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n", 
    18701870                        offs, self->pf->src, cursor)); 
    18711871    return cursor; 
     
    20572057    TRACE_PRINTF_ALIGN(("-ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n", 
    20582058                      offs, pf->src, cursor)); 
    20592059    offs += PAD_16_B(offs); 
    2060     cursor = (const opcode_t *)((const char *)(pf->src) + offs); 
     2060    cursor = pf->src + offs/sizeof(opcode_t); 
    20612061    TRACE_PRINTF_ALIGN(("+ALIGN_16: offset=0x%x src=0x%x cursor=0x%x\n", 
    20622062                      offs, pf->src, cursor)); 
    20632063