* Fixed more MSVC compilation warnings.
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ typedef unsigned short uint16_t;
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
|
||||
typedef unsigned long int uintptr_t;
|
||||
#include <stddef.h> /* Has uintptr_t etc. */
|
||||
typedef int pid_t;
|
||||
|
||||
#define inline /* undefined */
|
||||
|
||||
+5
-4
@@ -115,7 +115,8 @@ void _zz_fuzz(int fd, volatile uint8_t *buf, int64_t len)
|
||||
int64_t pos = _zz_getpos(fd);
|
||||
struct fuzz *fuzz;
|
||||
volatile uint8_t *aligned_buf;
|
||||
int i, j, todo;
|
||||
int64_t i, j;
|
||||
int todo;
|
||||
|
||||
#if 0
|
||||
debug("fuzz(%i, %lli@%lli)", fd, (long long int)len,
|
||||
@@ -132,7 +133,7 @@ void _zz_fuzz(int fd, volatile uint8_t *buf, int64_t len)
|
||||
/* Cache bitmask array */
|
||||
if(fuzz->cur != (int)i)
|
||||
{
|
||||
uint32_t chunkseed = (i + (int)(fuzz->ratio * MAGIC1)) ^ MAGIC2;
|
||||
uint32_t chunkseed = ((int)i + (int)(fuzz->ratio * MAGIC1)) ^ MAGIC2;
|
||||
_zz_srand(fuzz->seed ^ chunkseed);
|
||||
|
||||
memset(fuzz->data, 0, CHUNKBYTES);
|
||||
@@ -246,8 +247,8 @@ static void readchars(int *table, char const *list)
|
||||
&& tmp[1] && strchr(hex, tmp[1])
|
||||
&& tmp[2] && strchr(hex, tmp[2]))
|
||||
{
|
||||
new = ((strchr(hex, tmp[1]) - hex) & 0xf) << 4;
|
||||
new |= (strchr(hex, tmp[2]) - hex) & 0xf;
|
||||
new = ((int)(strchr(hex, tmp[1]) - hex) & 0xf) << 4;
|
||||
new |= (int)(strchr(hex, tmp[2]) - hex) & 0xf;
|
||||
tmp += 2;
|
||||
}
|
||||
else
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ struct fuzz
|
||||
{
|
||||
uint32_t seed;
|
||||
double ratio;
|
||||
int cur;
|
||||
int64_t cur;
|
||||
#ifdef HAVE_FGETLN
|
||||
char *tmp;
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ int mygetopt(int argc, char * const _argv[], const char *optstring,
|
||||
|
||||
for(i = 0; longopts[i].name; i++)
|
||||
{
|
||||
int l = strlen(longopts[i].name);
|
||||
size_t l = strlen(longopts[i].name);
|
||||
|
||||
if(strncmp(flag + 2, longopts[i].name, l))
|
||||
continue;
|
||||
|
||||
+3
-3
@@ -428,7 +428,7 @@ static void loop_stdin(struct opts *opts)
|
||||
_zz_md5_add(ctx, buf, ret);
|
||||
else while(ret)
|
||||
{
|
||||
if((nw = write(1, buf + off, (size_t)ret)) < 0)
|
||||
if((nw = write(1, buf + off, (unsigned int)ret)) < 0)
|
||||
break;
|
||||
ret -= nw;
|
||||
off += nw;
|
||||
@@ -1032,8 +1032,8 @@ static void *get_entry(char const *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (char *)nt->OptionalHeader.ImageBase +
|
||||
nt->OptionalHeader.AddressOfEntryPoint;
|
||||
return (void *)(uintptr_t)(nt->OptionalHeader.ImageBase +
|
||||
nt->OptionalHeader.AddressOfEntryPoint);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user