From 95c88a57b1ddc81d9aad0382b50a3b424cd5000b Mon Sep 17 00:00:00 2001 From: Hallvard B Furuseth Date: Wed, 29 Jun 2011 20:48:48 +0200 Subject: [PATCH] Warning cleanup: Make parent index unsigned --- libraries/libmdb/mdb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 3cbd179..e911b9c 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -144,7 +144,7 @@ typedef struct MDB_meta { /* meta (footer) page content */ typedef struct MDB_dhead { /* a dirty page */ SIMPLEQ_ENTRY(MDB_dpage) md_next; /* queue of dirty pages */ MDB_page *md_parent; - int md_pi; /* parent index */ + unsigned md_pi; /* parent index */ int md_num; } MDB_dhead; @@ -158,10 +158,10 @@ SIMPLEQ_HEAD(dirty_queue, MDB_dpage); typedef struct MDB_pageparent { MDB_page *mp_page; MDB_page *mp_parent; - int mp_pi; + unsigned mp_pi; } MDB_pageparent; -static MDB_dpage *mdb_newpage(MDB_txn *txn, MDB_page *parent, int parent_idx, int num); +static MDB_dpage *mdb_newpage(MDB_txn *txn, MDB_page *parent, unsigned int parent_idx, int num); static int mdb_touch(MDB_txn *txn, MDB_pageparent *mp); typedef struct MDB_ppage { /* ordered list of pages */ @@ -380,7 +380,7 @@ _mdb_cmp(MDB_db *db, const MDB_val *key1, const MDB_val *key2) /* Allocate new page(s) for writing */ static MDB_dpage * -mdb_newpage(MDB_txn *txn, MDB_page *parent, int parent_idx, int num) +mdb_newpage(MDB_txn *txn, MDB_page *parent, unsigned int parent_idx, int num) { MDB_dpage *dp; -- 2.7.4