Fixed some warnings (due to -Wall).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2840 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
adf71bf608
commit
cdeaad9578
@ -65,7 +65,7 @@ BufferPool::RequestBuffers(uint32 blockSize)
|
||||
|
||||
// allocate and connect buffers
|
||||
|
||||
for (int32 i = 0; i < kNumBuffers; i++) {
|
||||
for (uint32 i = 0; i < kNumBuffers; i++) {
|
||||
buffers[i] = (void **)malloc(blockSize);
|
||||
if (buffers[i] == NULL) {
|
||||
// free already allocated buffers
|
||||
@ -86,7 +86,7 @@ BufferPool::RequestBuffers(uint32 blockSize)
|
||||
release_sem(fLock);
|
||||
release_sem_etc(fFreeBuffers, kNumBuffers, B_DO_NOT_RESCHEDULE);
|
||||
} else {
|
||||
for (int32 i = 0; i < kNumBuffers; i++)
|
||||
for (uint32 i = 0; i < kNumBuffers; i++)
|
||||
free(buffers[i]);
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ BufferPool::ReleaseBuffers()
|
||||
return status;
|
||||
|
||||
void **buffer = fFirstFree;
|
||||
for (int32 i = 0; i < kNumBuffers && buffer; i++) {
|
||||
for (uint32 i = 0; i < kNumBuffers && buffer; i++) {
|
||||
void **nextBuffer = (void **)*buffer;
|
||||
|
||||
free(buffer);
|
||||
|
@ -27,9 +27,10 @@ get_tupel(uint32 id)
|
||||
tupel[2] = 0xff & (id >> 8);
|
||||
tupel[3] = 0xff & (id);
|
||||
tupel[4] = 0;
|
||||
for (int16 i = 0;i < 4;i++)
|
||||
for (int16 i = 0;i < 4;i++) {
|
||||
if (tupel[i] < ' ' || tupel[i] > 128)
|
||||
tupel[i] = '.';
|
||||
}
|
||||
|
||||
return (char *)tupel;
|
||||
}
|
||||
@ -56,7 +57,7 @@ dump_super_block(disk_super_block *superBlock)
|
||||
Print(" inode_size = %lu\n", superBlock->inode_size);
|
||||
Print(" magic2 = %#08lx (%s) %s\n", superBlock->magic2, get_tupel(superBlock->magic2), (superBlock->magic2 == (int)SUPER_BLOCK_MAGIC2 ? "valid" : "INVALID"));
|
||||
Print(" blocks_per_ag = %lu\n", superBlock->blocks_per_ag);
|
||||
Print(" ag_shift = %lu (%ld bytes)\n",superBlock->ag_shift, 1LL << superBlock->ag_shift);
|
||||
Print(" ag_shift = %lu (%ld bytes)\n", superBlock->ag_shift, 1L << superBlock->ag_shift);
|
||||
Print(" num_ags = %lu\n", superBlock->num_ags);
|
||||
Print(" flags = %#08lx (%s)\n", superBlock->flags, get_tupel(superBlock->flags));
|
||||
dump_block_run(" log_blocks = ", superBlock->log_blocks);
|
||||
@ -104,15 +105,18 @@ dump_inode(bfs_inode *inode)
|
||||
Print(" gid = %lu\n", inode->gid);
|
||||
Print(" mode = %08lx\n", inode->mode);
|
||||
Print(" flags = %08lx\n", inode->flags);
|
||||
Print(" create_time = %Ld (%Ld)\n",inode->create_time,inode->create_time >> INODE_TIME_SHIFT);
|
||||
Print(" last_modified_time = %Ld (%Ld)\n",inode->last_modified_time,inode->last_modified_time >> INODE_TIME_SHIFT);
|
||||
Print(" create_time = %Ld (%Ld)\n", inode->create_time,
|
||||
inode->create_time >> INODE_TIME_SHIFT);
|
||||
Print(" last_modified_time = %Ld (%Ld)\n", inode->last_modified_time,
|
||||
inode->last_modified_time >> INODE_TIME_SHIFT);
|
||||
dump_block_run( " parent = ", inode->parent);
|
||||
dump_block_run( " attributes = ", inode->attributes);
|
||||
Print(" type = %lu\n", inode->type);
|
||||
Print(" inode_size = %lu\n", inode->inode_size);
|
||||
Print(" etc = %#08lx\n", inode->etc);
|
||||
Print(" short_symlink = %s\n",
|
||||
S_ISLNK(inode->mode) && (inode->flags & INODE_LONG_SYMLINK) == 0? inode->short_symlink : "-");
|
||||
S_ISLNK(inode->mode) && (inode->flags & INODE_LONG_SYMLINK) == 0 ?
|
||||
inode->short_symlink : "-");
|
||||
dump_data_stream(&(inode->data));
|
||||
Print(" --\n pad[0] = %08lx\n", inode->pad[0]);
|
||||
Print(" pad[1] = %08lx\n", inode->pad[1]);
|
||||
@ -163,8 +167,7 @@ dump_block(const char *buffer,int size)
|
||||
Print(".");
|
||||
else
|
||||
Print("%c",c);
|
||||
}
|
||||
else
|
||||
} else
|
||||
break;
|
||||
}
|
||||
Print("\n");
|
||||
@ -223,8 +226,7 @@ dump_bplustree_node(bplustree_node *node,bplustree_header *header,Volume *volume
|
||||
|
||||
off_t offset = *value & 0x3fffffffffffffffLL;
|
||||
Print(" (%d bytes) -> %Ld", length, offset);
|
||||
if (volume != NULL)
|
||||
{
|
||||
if (volume != NULL) {
|
||||
block_run run = volume->ToBlockRun(offset);
|
||||
Print(" (%ld, %d)", run.allocation_group, run.start);
|
||||
}
|
||||
@ -238,4 +240,3 @@ dump_bplustree_node(bplustree_node *node,bplustree_header *header,Volume *volume
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,8 +76,8 @@ sorted_array::Remove(off_t value)
|
||||
BlockArray::BlockArray(int32 blockSize)
|
||||
:
|
||||
fArray(NULL),
|
||||
fSize(0),
|
||||
fBlockSize(blockSize)
|
||||
fBlockSize(blockSize),
|
||||
fSize(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user