Changeset 1736


Ignore:
Timestamp:
Feb 2, 2007, 12:58:06 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • Fixed more MSVC compilation warnings.
Location:
zzuf/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/msvc/config.h

    r1730 r1736  
    3636typedef unsigned char uint8_t;
    3737
    38 typedef unsigned long int uintptr_t;
     38#include <stddef.h> /* Has uintptr_t etc. */
    3939typedef int pid_t;
    4040
  • zzuf/trunk/src/fuzz.c

    r1732 r1736  
    116116    struct fuzz *fuzz;
    117117    volatile uint8_t *aligned_buf;
    118     int i, j, todo;
     118    int64_t i, j;
     119    int todo;
    119120
    120121#if 0
     
    133134        if(fuzz->cur != (int)i)
    134135        {
    135             uint32_t chunkseed = (i + (int)(fuzz->ratio * MAGIC1)) ^ MAGIC2;
     136            uint32_t chunkseed = ((int)i + (int)(fuzz->ratio * MAGIC1)) ^ MAGIC2;
    136137            _zz_srand(fuzz->seed ^ chunkseed);
    137138
     
    247248                     && tmp[2] && strchr(hex, tmp[2]))
    248249            {
    249                 new = ((strchr(hex, tmp[1]) - hex) & 0xf) << 4;
    250                 new |= (strchr(hex, tmp[2]) - hex) & 0xf;
     250                new = ((int)(strchr(hex, tmp[1]) - hex) & 0xf) << 4;
     251                new |= (int)(strchr(hex, tmp[2]) - hex) & 0xf;
    251252                tmp += 2;
    252253            }
  • zzuf/trunk/src/libzzuf.h

    r1732 r1736  
    3535    uint32_t seed;
    3636    double ratio;
    37     int cur;
     37    int64_t cur;
    3838#ifdef HAVE_FGETLN
    3939    char *tmp;
  • zzuf/trunk/src/mygetopt.c

    r1733 r1736  
    8787        for(i = 0; longopts[i].name; i++)
    8888        {
    89             int l = strlen(longopts[i].name);
     89            size_t l = strlen(longopts[i].name);
    9090
    9191            if(strncmp(flag + 2, longopts[i].name, l))
  • zzuf/trunk/src/zzuf.c

    r1733 r1736  
    429429        else while(ret)
    430430        {
    431             if((nw = write(1, buf + off, (size_t)ret)) < 0)
     431            if((nw = write(1, buf + off, (unsigned int)ret)) < 0)
    432432                break;
    433433            ret -= nw;
     
    10331033    }
    10341034
    1035     return (char *)nt->OptionalHeader.ImageBase +
    1036                            nt->OptionalHeader.AddressOfEntryPoint;
     1035    return (void *)(uintptr_t)(nt->OptionalHeader.ImageBase +
     1036                                 nt->OptionalHeader.AddressOfEntryPoint);
    10371037}
    10381038#endif
Note: See TracChangeset for help on using the changeset viewer.