shithub: choc

Download patch

ref: 201ba4b81853750c9ee262140c795d87b23ae24d
parent: a68f44a2c103aa0e6c6bd73417d17d1197f47b2a
author: Simon Howard <fraggle@gmail.com>
date: Tue Oct 17 21:07:28 EDT 2006

Shut up warnings in w_wad.c.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 706

--- a/src/d_main.c
+++ b/src/d_main.c
@@ -852,7 +852,7 @@
 
     if (gamemission == none)
     {
-        int i;
+        unsigned int i;
 
         for (i=0; i<numlumps; ++i)
         {
--- a/src/w_checksum.c
+++ b/src/w_checksum.c
@@ -75,7 +75,7 @@
 void W_Checksum(md5_digest_t digest)
 {
     md5_context_t md5_context;
-    int i;
+    unsigned int i;
 
     MD5_Init(&md5_context);
 
--- a/src/w_merge.c
+++ b/src/w_merge.c
@@ -524,7 +524,7 @@
 
 void W_PrintDirectory(void)
 {
-    int i, n;
+    unsigned int i, n;
 
     // debug
     for (i=0; i<numlumps; ++i)
--- a/src/w_wad.c
+++ b/src/w_wad.c
@@ -47,7 +47,7 @@
 // Location of each lump on disk.
 
 lumpinfo_t *lumpinfo;		
-int numlumps = 0;
+unsigned int numlumps = 0;
 
 // Hash table for fast lookups
 
@@ -138,7 +138,7 @@
 //  specially to allow map reloads.
 // But: the reload feature is a fragile hack...
 
-int			reloadlump;
+unsigned int		reloadlump;
 char*			reloadname;
 
 
@@ -146,7 +146,7 @@
 {
     wadinfo_t		header;
     lumpinfo_t*		lump_p;
-    unsigned		i;
+    unsigned int	i;
     FILE               *handle;
     int			length;
     int			startlump;
@@ -252,7 +252,7 @@
     wadinfo_t		header;
     int			lumpcount;
     lumpinfo_t*		lump_p;
-    unsigned		i;
+    unsigned int	i;
     FILE               *handle;
     int			length;
     filelump_t*		fileinfo;
@@ -374,7 +374,7 @@
 // W_LumpLength
 // Returns the buffer size needed to load the given lump.
 //
-int W_LumpLength (int lump)
+int W_LumpLength (unsigned int lump)
 {
     if (lump >= numlumps)
 	I_Error ("W_LumpLength: %i >= numlumps",lump);
@@ -391,7 +391,7 @@
 //
 void
 W_ReadLump
-( int		lump,
+( unsigned int	lump,
   void*		dest )
 {
     int		c;
@@ -543,7 +543,7 @@
 
 void W_GenerateHashTable(void)
 {
-    int i;
+    unsigned int i;
 
     // Free the old hash table, if there is one
 
--- a/src/w_wad.h
+++ b/src/w_wad.h
@@ -74,7 +74,7 @@
 
 extern	void**		lumpcache;
 extern	lumpinfo_t*	lumpinfo;
-extern	int		numlumps;
+extern	unsigned int	numlumps;
 
 FILE   *W_AddFile (char *filename);
 void    W_Reload (void);
@@ -82,8 +82,8 @@
 int	W_CheckNumForName (char* name);
 int	W_GetNumForName (char* name);
 
-int	W_LumpLength (int lump);
-void    W_ReadLump (int lump, void *dest);
+int	W_LumpLength (unsigned int lump);
+void    W_ReadLump (unsigned int lump, void *dest);
 
 void*	W_CacheLumpNum (int lump, int tag);
 void*	W_CacheLumpName (char* name, int tag);