Silenced more warnings

svn-id: r38267
This commit is contained in:
Filippos Karapetis 2009-02-15 16:45:39 +00:00
parent aff0a0daac
commit 06186502b2
6 changed files with 8 additions and 5 deletions

View file

@ -459,6 +459,7 @@ parse_reg_t(state_t *s, const char *str, reg_t *dest)
int valid = 1; int valid = 1;
object_t *obj = NULL; /* Surpress spurious warning */ object_t *obj = NULL; /* Surpress spurious warning */
reg_t objpos; reg_t objpos;
objpos.offset = 0;
objpos.segment = i; objpos.segment = i;
if (mobj->type == MEM_OBJ_SCRIPT) { if (mobj->type == MEM_OBJ_SCRIPT) {

View file

@ -1838,6 +1838,8 @@ gfxop_get_event(gfx_state_t *state, unsigned int mask)
{ {
sci_event_t error_event = { SCI_EVT_ERROR, 0, 0 }; sci_event_t error_event = { SCI_EVT_ERROR, 0, 0 };
sci_event_t event; sci_event_t event;
event.data = 0;
event.buckybits = 0;
gfx_input_event_t **seekerp = &(state->events); gfx_input_event_t **seekerp = &(state->events);
BASIC_CHECKS(error_event); BASIC_CHECKS(error_event);

View file

@ -135,7 +135,7 @@ gfxr_init_static_palette()
gfx_sci0_pic_colors[i].b = INTERCOL(gfx_sci0_image_colors[sci0_palette][i & 0xf].b, gfx_sci0_pic_colors[i].b = INTERCOL(gfx_sci0_image_colors[sci0_palette][i & 0xf].b,
gfx_sci0_image_colors[sci0_palette][i >> 4].b); gfx_sci0_image_colors[sci0_palette][i >> 4].b);
} }
WARNING("Uncomment me after fixing sci0_palette changes to reset me"); //WARNING("Uncomment me after fixing sci0_palette changes to reset me");
/* _gfxr_pic0_colors_initialized = 1; */ /* _gfxr_pic0_colors_initialized = 1; */
} }
} }

View file

@ -244,7 +244,7 @@ _scir_init_trivial(resource_mgr_t *mgr)
static void static void
_scir_load_from_patch_file(int fh, resource_t *res, char *filename) _scir_load_from_patch_file(int fh, resource_t *res, char *filename)
{ {
int really_read; unsigned int really_read;
res->data = (unsigned char*)sci_malloc(res->size); res->data = (unsigned char*)sci_malloc(res->size);
really_read = read(fh, res->data, res->size); really_read = read(fh, res->data, res->size);

View file

@ -753,7 +753,7 @@ _sci1_sample_init(sci1_song_iterator_t *self, int offset)
int begin; int begin;
int end; int end;
CHECK_FOR_END_ABSOLUTE(offset + 10); CHECK_FOR_END_ABSOLUTE((unsigned int)offset + 10);
if (self->data[offset + 1] != 0) if (self->data[offset + 1] != 0)
sciprintf("[iterator-1] In sample at offset 0x04x: Byte #1 is %02x instead of zero\n", sciprintf("[iterator-1] In sample at offset 0x04x: Byte #1 is %02x instead of zero\n",
self->data[offset + 1]); self->data[offset + 1]);
@ -763,7 +763,7 @@ _sci1_sample_init(sci1_song_iterator_t *self, int offset)
begin = getInt16(self->data + offset + 6); begin = getInt16(self->data + offset + 6);
end = getInt16(self->data + offset + 8); end = getInt16(self->data + offset + 8);
CHECK_FOR_END_ABSOLUTE(offset + 10 + length); CHECK_FOR_END_ABSOLUTE((unsigned int)(offset + 10 + length));
sample = (sci1_sample_t*)sci_malloc(sizeof(sci1_sample_t)); sample = (sci1_sample_t*)sci_malloc(sizeof(sci1_sample_t));
sample->delta = begin; sample->delta = begin;

View file

@ -430,7 +430,7 @@ static instrument_t *read_instrument(FILE *file, int *id)
sciprintf(" Segment offsets: 0 %i %i\n", loop_offset, read_int32(header + 43)); sciprintf(" Segment offsets: 0 %i %i\n", loop_offset, read_int32(header + 43));
#endif #endif
instrument->samples = (sbyte *) sci_malloc(size + 1); instrument->samples = (sbyte *) sci_malloc(size + 1);
if (fread(instrument->samples, 1, size, file) < size) { if (fread(instrument->samples, 1, size, file) < (unsigned int)size) {
sciprintf("[sfx:seq:amiga] Error: failed to read instrument samples\n"); sciprintf("[sfx:seq:amiga] Error: failed to read instrument samples\n");
return NULL; return NULL;
} }