clean up some warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5174 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include "bget.h"
|
#include "bget.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void set_area_buffer_management(void);
|
||||||
void * expand_area_storage(long size);
|
void * expand_area_storage(long size);
|
||||||
void contract_area_storage(void *buffer);
|
void contract_area_storage(void *buffer);
|
||||||
|
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ void *bget(requested_size)
|
|||||||
|
|
||||||
assert(size > 0);
|
assert(size > 0);
|
||||||
|
|
||||||
if (size < SizeQ) { /* Need at least room for the */
|
if (size < (bufsize)SizeQ) { /* Need at least room for the */
|
||||||
size = SizeQ; /* queue links. */
|
size = SizeQ; /* queue links. */
|
||||||
}
|
}
|
||||||
#ifdef SizeQuant
|
#ifdef SizeQuant
|
||||||
@@ -250,7 +250,7 @@ void *bget(requested_size)
|
|||||||
buffer if enough room remains for a header plus the minimum
|
buffer if enough room remains for a header plus the minimum
|
||||||
quantum of allocation. */
|
quantum of allocation. */
|
||||||
|
|
||||||
if ((b->bh.bsize - size) > (SizeQ + (sizeof(struct bhead)))) {
|
if ((b->bh.bsize - size) > (bufsize)(SizeQ + (sizeof(struct bhead)))) {
|
||||||
struct bhead *ba, *bn;
|
struct bhead *ba, *bn;
|
||||||
|
|
||||||
ba = BH(((char *) b) + (b->bh.bsize - size));
|
ba = BH(((char *) b) + (b->bh.bsize - size));
|
||||||
@@ -319,7 +319,7 @@ void *bget(requested_size)
|
|||||||
/* Don't give up yet -- look in the reserve supply. */
|
/* Don't give up yet -- look in the reserve supply. */
|
||||||
|
|
||||||
if (acqfcn != NULL) {
|
if (acqfcn != NULL) {
|
||||||
if (size > exp_incr - sizeof(struct bhead)) {
|
if (size > (bufsize)(exp_incr - sizeof(struct bhead))) {
|
||||||
|
|
||||||
/* Request is too large to fit in a single expansion
|
/* Request is too large to fit in a single expansion
|
||||||
block. Try to satisy it by a direct buffer acquisition. */
|
block. Try to satisy it by a direct buffer acquisition. */
|
||||||
@@ -560,7 +560,7 @@ void brel(buf)
|
|||||||
pool blocks are the same size. */
|
pool blocks are the same size. */
|
||||||
|
|
||||||
if (relfcn != NULL &&
|
if (relfcn != NULL &&
|
||||||
((bufsize) b->bh.bsize) == (pool_len - sizeof(struct bhead))) {
|
((bufsize) b->bh.bsize) == (bufsize)(pool_len - sizeof(struct bhead))) {
|
||||||
|
|
||||||
assert(b->bh.prevfree == 0);
|
assert(b->bh.prevfree == 0);
|
||||||
assert(BH((char *) b + b->bh.bsize)->bsize == ESent);
|
assert(BH((char *) b + b->bh.bsize)->bsize == ESent);
|
||||||
@@ -799,7 +799,7 @@ void bpoold(buf, dumpalloc, dumpfree)
|
|||||||
(long) bs, lerr);
|
(long) bs, lerr);
|
||||||
#ifdef FreeWipe
|
#ifdef FreeWipe
|
||||||
lerr = ((char *) b) + sizeof(struct bfhead);
|
lerr = ((char *) b) + sizeof(struct bfhead);
|
||||||
if ((bs > sizeof(struct bfhead)) && ((*lerr != 0x55) ||
|
if ((bs > (bufsize)sizeof(struct bfhead)) && ((*lerr != 0x55) ||
|
||||||
(memcmp(lerr, lerr + 1,
|
(memcmp(lerr, lerr + 1,
|
||||||
(MemSize) (bs - (sizeof(struct bfhead) + 1))) != 0))) {
|
(MemSize) (bs - (sizeof(struct bfhead) + 1))) != 0))) {
|
||||||
V printf(
|
V printf(
|
||||||
@@ -847,7 +847,7 @@ int bpoolv(buf)
|
|||||||
}
|
}
|
||||||
#ifdef FreeWipe
|
#ifdef FreeWipe
|
||||||
lerr = ((char *) b) + sizeof(struct bfhead);
|
lerr = ((char *) b) + sizeof(struct bfhead);
|
||||||
if ((bs > sizeof(struct bfhead)) && ((*lerr != 0x55) ||
|
if ((bs > (bufsize)sizeof(struct bfhead)) && ((*lerr != 0x55) ||
|
||||||
(memcmp(lerr, lerr + 1,
|
(memcmp(lerr, lerr + 1,
|
||||||
(MemSize) (bs - (sizeof(struct bfhead) + 1))) != 0))) {
|
(MemSize) (bs - (sizeof(struct bfhead) + 1))) != 0))) {
|
||||||
V printf(
|
V printf(
|
||||||
|
|||||||
Reference in New Issue
Block a user