Commit 4d11eba0 authored by Stefan Huehner's avatar Stefan Huehner Committed by Alexandre Julliard

Fix some -Wsign-compare warnings.

parent 6580ae03
......@@ -55,7 +55,7 @@ res_t *new_res(void)
return r;
}
res_t *grow_res(res_t *r, int add)
res_t *grow_res(res_t *r, unsigned int add)
{
r->allocsize += add;
r->data = (char *)xrealloc(r->data, r->allocsize);
......@@ -407,7 +407,7 @@ static void put_lvc(res_t *res, lvc_t *lvc)
*/
static void put_raw_data(res_t *res, raw_data_t *raw, int offset)
{
int wsize = raw->size - offset;
unsigned int wsize = raw->size - offset;
if(res->allocsize - res->size < wsize)
grow_res(res, wsize);
memcpy(&(res->data[res->size]), raw->data + offset, wsize);
......
......@@ -24,7 +24,7 @@
#include "wrctypes.h"
res_t *new_res(void);
res_t *grow_res(res_t *r, int add);
res_t *grow_res(res_t *r, unsigned int add);
void put_byte(res_t *res, unsigned c);
void put_word(res_t *res, unsigned w);
void put_dword(res_t *res, unsigned d);
......
......@@ -87,10 +87,10 @@
#define RES_BLOCKSIZE 512
typedef struct res {
int allocsize; /* Allocated datablock size */
int size; /* Actual size of data */
int dataidx; /* Tag behind the resource-header */
char *data;
unsigned int allocsize; /* Allocated datablock size */
unsigned int size; /* Actual size of data */
unsigned int dataidx; /* Tag behind the resource-header */
char *data;
} res_t;
/* Resource strings are slightly more complex because they include '\0' */
......
......@@ -47,7 +47,7 @@
void write_resfile(char *outname, resource_t *top)
{
FILE *fo;
int ret;
unsigned int ret;
char zeros[3] = {0, 0, 0};
fo = fopen(outname, "wb");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment