Fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4901 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -48,7 +48,7 @@ shutdown_cache(BFile *file,int32 blockSize)
|
|||||||
static status_t
|
static status_t
|
||||||
readBlocks(BFile *file,uint32 num,uint32 size)
|
readBlocks(BFile *file,uint32 num,uint32 size)
|
||||||
{
|
{
|
||||||
for (int32 i = gBlocks.CountItems();i <= num;i++) {
|
for (uint32 i = gBlocks.CountItems(); i <= num; i++) {
|
||||||
void *buffer = malloc(size);
|
void *buffer = malloc(size);
|
||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ dumpKey(void *key,int32 length)
|
|||||||
{
|
{
|
||||||
switch (gType) {
|
switch (gType) {
|
||||||
case S_STR_INDEX:
|
case S_STR_INDEX:
|
||||||
printf("\"%s\" (%ld bytes)",key,length);
|
printf("\"%s\" (%ld bytes)", (char *)key, length);
|
||||||
break;
|
break;
|
||||||
case S_INT_INDEX:
|
case S_INT_INDEX:
|
||||||
printf("%ld", *(int32 *)key);
|
printf("%ld", *(int32 *)key);
|
||||||
@@ -246,7 +246,7 @@ bool
|
|||||||
findKey(void *key, int32 length, int32 maxIndex)
|
findKey(void *key, int32 length, int32 maxIndex)
|
||||||
{
|
{
|
||||||
for (int32 i = length;i < maxIndex;i += MAX_STRING - MIN_STRING) {
|
for (int32 i = length;i < maxIndex;i += MAX_STRING - MIN_STRING) {
|
||||||
if (length == gKeys[i].length
|
if (length == (int32)gKeys[i].length
|
||||||
&& !memcpy(key, gKeys[i].data, length))
|
&& !memcpy(key, gKeys[i].data, length))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -606,8 +606,8 @@ usage(char *program)
|
|||||||
"\t-t\ttype is one of string, int32, uint32, int64, uint64, float,\n"
|
"\t-t\ttype is one of string, int32, uint32, int64, uint64, float,\n"
|
||||||
"\t\tor double; defaults to string.\n"
|
"\t\tor double; defaults to string.\n"
|
||||||
"\t-n\tkeys is the number of keys to be used,\n"
|
"\t-n\tkeys is the number of keys to be used,\n"
|
||||||
"\t\tminimum is 1, defaults to %ld.\n"
|
"\t\tminimum is 1, defaults to %d.\n"
|
||||||
"\t-i\titerations is the number of the test cycles, defaults to %ld.\n"
|
"\t-i\titerations is the number of the test cycles, defaults to %d.\n"
|
||||||
"\t-r\tthe seed for the random function, defaults to %ld.\n"
|
"\t-r\tthe seed for the random function, defaults to %ld.\n"
|
||||||
"\t-h\tremoves the keys and start over again for x times.\n"
|
"\t-h\tremoves the keys and start over again for x times.\n"
|
||||||
"\t-e\texcessive validity tests: tree contents will be tested after every operation\n"
|
"\t-e\texcessive validity tests: tree contents will be tested after every operation\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user