mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-12-19 19:53:28 +08:00
Warnings fixes
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user