Fix some -Wsign-compare warnings.
This commit is contained in:
parent
6580ae03ed
commit
4d11eba003
|
@ -55,7 +55,7 @@ res_t *new_res(void)
|
||||||
return r;
|
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->allocsize += add;
|
||||||
r->data = (char *)xrealloc(r->data, r->allocsize);
|
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)
|
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)
|
if(res->allocsize - res->size < wsize)
|
||||||
grow_res(res, wsize);
|
grow_res(res, wsize);
|
||||||
memcpy(&(res->data[res->size]), raw->data + offset, wsize);
|
memcpy(&(res->data[res->size]), raw->data + offset, wsize);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "wrctypes.h"
|
#include "wrctypes.h"
|
||||||
|
|
||||||
res_t *new_res(void);
|
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_byte(res_t *res, unsigned c);
|
||||||
void put_word(res_t *res, unsigned w);
|
void put_word(res_t *res, unsigned w);
|
||||||
void put_dword(res_t *res, unsigned d);
|
void put_dword(res_t *res, unsigned d);
|
||||||
|
|
|
@ -87,10 +87,10 @@
|
||||||
#define RES_BLOCKSIZE 512
|
#define RES_BLOCKSIZE 512
|
||||||
|
|
||||||
typedef struct res {
|
typedef struct res {
|
||||||
int allocsize; /* Allocated datablock size */
|
unsigned int allocsize; /* Allocated datablock size */
|
||||||
int size; /* Actual size of data */
|
unsigned int size; /* Actual size of data */
|
||||||
int dataidx; /* Tag behind the resource-header */
|
unsigned int dataidx; /* Tag behind the resource-header */
|
||||||
char *data;
|
char *data;
|
||||||
} res_t;
|
} res_t;
|
||||||
|
|
||||||
/* Resource strings are slightly more complex because they include '\0' */
|
/* Resource strings are slightly more complex because they include '\0' */
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
void write_resfile(char *outname, resource_t *top)
|
void write_resfile(char *outname, resource_t *top)
|
||||||
{
|
{
|
||||||
FILE *fo;
|
FILE *fo;
|
||||||
int ret;
|
unsigned int ret;
|
||||||
char zeros[3] = {0, 0, 0};
|
char zeros[3] = {0, 0, 0};
|
||||||
|
|
||||||
fo = fopen(outname, "wb");
|
fo = fopen(outname, "wb");
|
||||||
|
|
Loading…
Reference in New Issue