Fix some -Wsign-compare warnings.

This commit is contained in:
Stefan Huehner 2005-06-30 18:10:08 +00:00 committed by Alexandre Julliard
parent 6580ae03ed
commit 4d11eba003
4 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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);

View File

@ -87,9 +87,9 @@
#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 */
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;

View File

@ -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");