]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
stomping more size_t warnings
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Jul 2005 11:57:50 +0000 (11:57 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Jul 2005 11:57:50 +0000 (11:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5500 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.h
snd_ogg.c

index d2e37f39051b49b14596894895870383b25953c6..0248a92cf54cd1317da2b082ff08ed08ea54a673 100644 (file)
@@ -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
 };
index cdc41f759a62b1dd078a000c39a65844b0fea872..ee2ecfcfc06a36940bb86df7391c8778d4a0d3f2 100644 (file)
--- 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)