ref: 1a3b7dc68ec19b9bae701bd251c0f866dffffaf6
parent: 9f50a531673811a2cfe1622b5bf5d0bc7d9c68e0
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Feb 1 13:33:12 EST 2024
fix type warnings with certain platforms/compilers
--- a/i_tga.c
+++ b/i_tga.c
@@ -227,7 +227,7 @@
if(f.extoff != 0 && memcmp(p, tga_sig, sizeof(f.sig)) == 0){
f.extoff += ExtAreaAttrTypeOffset - HeaderSize;
if(f.extoff >= (u32int)sz){
- werrstr("extoff out of range: %d", f.extoff);
+ werrstr("extoff out of range: %d", (int)f.extoff);
goto err;
}
switch(in[f.extoff]){
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -1783,7 +1783,7 @@
s = G_STRING(pr, OFS_PARM0);
for(n = 0; s != nil && n < nelem(pr->parse_cl_command.argv); n++){
- while(*s && isspace(*s))
+ while(*s && isspace((int)*s))
s++;
if(*s == 0 || (s = COM_Parse(s)) == nil)
break;
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -64,11 +64,6 @@
static cvar_t ambient_level = {"ambient_level", "0.3"};
static cvar_t ambient_fade = {"ambient_fade", "100"};
-static byte *data_p;
-static byte *iff_end;
-static byte *last_chunk;
-static byte *iff_data;
-
/* TODO: refuctor wav loading */
static void
resample(sfxcache_t *sc, byte *data, float stepscale)
@@ -318,7 +313,7 @@
}
void
-stepsnd(view_t *v)
+stepsnd(const view_t *v)
{
long ns;
Chan *c, *sum;
--- a/stb_vorbis.c
+++ b/stb_vorbis.c
@@ -4340,7 +4340,7 @@
// start of a packet
static int go_to_page_before(stb_vorbis *f, unsigned int limit_offset)
{
- unsigned int previous_safe, end;
+ u32int previous_safe, end;
// now we want to seek back 64K from the limit
if (limit_offset >= 65536 && limit_offset-65536 >= f->first_audio_page_offset)
@@ -4611,13 +4611,12 @@
unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f)
{
- unsigned int restore_offset, previous_safe;
- unsigned int end, last_page_loc;
+ u32int restore_offset, previous_safe;
+ u32int end, last_page_loc;
if (IS_PUSH_MODE(f)) return error(f, VORBIS_invalid_api_mixing);
if (!f->total_samples) {
- unsigned int last;
- u32int lo,hi;
+ u32int last, lo, hi;
char header[6];
// first, store the current decode position so we can restore it