Resolve many build warnings
This patch fixes many warnings from the beginning of the build up to and including the depend stage. Nearly all warnings should be gone even with -Wall.
This commit is contained in:
committed by
Jon Trulson
parent
2bf29e5d63
commit
42e891d9e7
@@ -231,5 +231,3 @@ DYNAMIC =
|
||||
XCOMM Variables to switch on debug mode temporarily
|
||||
XCOMM CDEBUGFLAGS = -g -DDEBUG
|
||||
XCOMM CXXDEBUGFLAGS = -g -DDEBUG
|
||||
|
||||
DependTarget()
|
||||
|
||||
@@ -270,7 +270,7 @@ __bt_split(t, sp, key, data, flags, ilen, skip)
|
||||
rchild->pgno, bl->flags & P_BIGKEY);
|
||||
memmove(dest, bl->bytes, nksize ? nksize : bl->ksize);
|
||||
if (bl->flags & P_BIGKEY &&
|
||||
bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
|
||||
bt_preserve(t, *(char *)bl->bytes) == RET_ERROR)
|
||||
goto err1;
|
||||
break;
|
||||
case P_RINTERNAL:
|
||||
@@ -590,7 +590,7 @@ bt_broot(t, h, l, r)
|
||||
* so it isn't deleted when the leaf copy of the key is deleted.
|
||||
*/
|
||||
if (bl->flags & P_BIGKEY &&
|
||||
bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
|
||||
bt_preserve(t, *(char *)bl->bytes) == RET_ERROR)
|
||||
return (RET_ERROR);
|
||||
break;
|
||||
case P_BINTERNAL:
|
||||
|
||||
@@ -114,8 +114,8 @@ mpool_open(key, fd, pagesize, maxcache)
|
||||
|
||||
if ((mp = malloc(sizeof(MPOOL))) == NULL)
|
||||
return (NULL);
|
||||
mp->free.cnext = mp->free.cprev = (BKT *)&mp->free;
|
||||
mp->lru.cnext = mp->lru.cprev = (BKT *)&mp->lru;
|
||||
mp->free.cnext = mp->free.cprev = (BKT *)(void *)&mp->free;
|
||||
mp->lru.cnext = mp->lru.cprev = (BKT *)(void *)&mp->lru;
|
||||
for (entry = 0; entry < HASHSIZE; ++entry)
|
||||
mp->hashtable[entry].hnext = mp->hashtable[entry].hprev =
|
||||
mp->hashtable[entry].cnext = mp->hashtable[entry].cprev =
|
||||
@@ -322,7 +322,7 @@ mpool_close(mp)
|
||||
BKT *b, *next;
|
||||
|
||||
/* Free up any space allocated to the lru pages. */
|
||||
for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = next) {
|
||||
for (b = mp->lru.cprev; b != (BKT *)(void *)&mp->lru; b = next) {
|
||||
next = b->cprev;
|
||||
free(b);
|
||||
}
|
||||
@@ -345,7 +345,7 @@ mpool_sync(mp)
|
||||
{
|
||||
BKT *b;
|
||||
|
||||
for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = b->cprev)
|
||||
for (b = mp->lru.cprev; b != (BKT *)(void *)&mp->lru; b = b->cprev)
|
||||
if (b->flags & MPOOL_DIRTY && mpool_write(mp, b) == RET_ERROR)
|
||||
return (RET_ERROR);
|
||||
return (fsync(mp->fd) ? RET_ERROR : RET_SUCCESS);
|
||||
@@ -375,7 +375,7 @@ mpool_bkt(mp)
|
||||
* any lists. If we don't find anything we grow the cache anyway.
|
||||
* The cache never shrinks.
|
||||
*/
|
||||
for (b = mp->lru.cprev; b != (BKT *)&mp->lru; b = b->cprev)
|
||||
for (b = mp->lru.cprev; b != (BKT *)(void *)&mp->lru; b = b->cprev)
|
||||
if (!(b->flags & MPOOL_PINNED)) {
|
||||
if (b->flags & MPOOL_DIRTY &&
|
||||
mpool_write(mp, b) == RET_ERROR)
|
||||
|
||||
@@ -137,7 +137,7 @@ typedef struct MPOOL {
|
||||
}
|
||||
#define inschain(bp, dp) { \
|
||||
(bp)->cnext = (dp)->cnext; \
|
||||
(bp)->cprev = (struct BKT *)(dp); \
|
||||
(bp)->cprev = (struct BKT *)(void *)(dp); \
|
||||
(dp)->cnext->cprev = (bp); \
|
||||
(dp)->cnext = (bp); \
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ Boolean data_t::binaryIn(buffer& buf)
|
||||
|
||||
break;
|
||||
}
|
||||
buf.get(*(long*)&dt);
|
||||
buf.get(*(char*)&dt);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user