Warnings fixes

This commit is contained in:
whydoubt
2004-07-17 17:30:38 +00:00
parent 4cc424f913
commit 4a4110da18
2 changed files with 8 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ Sat Jul 17 09:21:13 CDT 2004 Jeff Smith <whydoubt@yahoo.com>
* src/libmdb/index.c: * src/libmdb/index.c:
* src/libmdb/write.c: * src/libmdb/write.c:
* src/util/prindex.c: Warnings fixes * src/util/prindex.c: Warnings fixes
* src/libmdb/map.c: Warnings fixes
Sat Jul 17 02:47:16 CDT 2004 Jeff Smith <whydoubt@yahoo.com> Sat Jul 17 02:47:16 CDT 2004 Jeff Smith <whydoubt@yahoo.com>
* include/mdbtools.h: * include/mdbtools.h:

View File

@@ -23,16 +23,16 @@
#include "dmalloc.h" #include "dmalloc.h"
#endif #endif
guint32 static guint32
mdb_map_find_next0(MdbHandle *mdb, unsigned char *map, int map_sz, guint32 start_pg) mdb_map_find_next0(MdbHandle *mdb, unsigned char *map, unsigned int map_sz, guint32 start_pg)
{ {
int pgnum, i, bitn; unsigned int pgnum, i, bitn;
pgnum = mdb_get_int32(map,1); pgnum = mdb_get_int32(map,1);
/* the first 5 bytes of the usage map mean something */ /* the first 5 bytes of the usage map mean something */
for (i=5;i<map_sz;i++) { for (i=5;i<map_sz;i++) {
for (bitn=0;bitn<8;bitn++) { for (bitn=0;bitn<8;bitn++) {
if (map[i] & 1 << bitn && pgnum > start_pg) { if ((map[i] & (1 << bitn)) && (pgnum > start_pg)) {
return pgnum; return pgnum;
} }
pgnum++; pgnum++;
@@ -41,8 +41,8 @@ mdb_map_find_next0(MdbHandle *mdb, unsigned char *map, int map_sz, guint32 start
/* didn't find anything */ /* didn't find anything */
return 0; return 0;
} }
int static int
mdb_map_find_next1(MdbHandle *mdb, unsigned char *map, int map_sz, guint32 start_pg) mdb_map_find_next1(MdbHandle *mdb, unsigned char *map, unsigned int map_sz, guint32 start_pg)
{ {
guint32 pgnum, i, j, bitn, map_pg; guint32 pgnum, i, j, bitn, map_pg;
@@ -73,7 +73,7 @@ mdb_map_find_next1(MdbHandle *mdb, unsigned char *map, int map_sz, guint32 start
return 0; return 0;
} }
guint32 guint32
mdb_map_find_next(MdbHandle *mdb, unsigned char *map, int map_sz, guint32 start_pg) mdb_map_find_next(MdbHandle *mdb, unsigned char *map, unsigned int map_sz, guint32 start_pg)
{ {
int map_type; int map_type;