From: havoc Date: Tue, 5 Jul 2005 11:57:50 +0000 (+0000) Subject: stomping more size_t warnings X-Git-Tag: xonotic-v0.1.0preview~4686 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0960e4f6c7b5cd1e00117a67acdebda21b2e95dd;p=xonotic%2Fdarkplaces.git stomping more size_t warnings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5500 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_main.h b/snd_main.h index d2e37f39..0248a92c 100644 --- a/snd_main.h +++ b/snd_main.h @@ -26,8 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct { - size_t length; - size_t offset; + unsigned int length; + unsigned int offset; qbyte data[4]; // variable sized } sfxbuffer_t; @@ -59,7 +59,7 @@ struct sfx_s unsigned int flags; // cf SFXFLAG_* defines snd_format_t format; int loopstart; - size_t total_length; + unsigned int total_length; const snd_fetcher_t *fetcher; void *fetcher_data; // Per-sfx data for the sound fetching functions }; diff --git a/snd_ogg.c b/snd_ogg.c index cdc41f75..ee2ecfcf 100644 --- a/snd_ogg.c +++ b/snd_ogg.c @@ -452,7 +452,7 @@ static const sfxbuffer_t* OGG_FetchSound (channel_t* ch, unsigned int start, uns if (sb->offset <= start && sb->offset + sb->length >= start + nbsamples) return sb; - newlength = sb->offset + sb->length - start; + newlength = (int)(sb->offset + sb->length) - start; // If we need to skip some data before decompressing the rest, or if the stream has looped if (newlength < 0 || sb->offset > start)