Fixed warnings about possibly non-initialized variables.

Fixed a possible non-crash (it OpenBeOS, addresses below 0x80000000 are valid
user memory).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7354 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-05-02 23:20:15 +00:00
parent 743c3cceb9
commit 203849cc49
3 changed files with 7 additions and 6 deletions

View File

@ -1739,7 +1739,7 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz
{
size_t err = 0;
cache_ent *ce;
cache_ent_list *cel;
cache_ent_list *cel = NULL;
if (chatty_io > 1)
printf("cbio: bnum = %Ld, num_blocks = %Ld, bsize = %d, op = %s\n", bnum, num_blocks,
@ -1772,7 +1772,9 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz
dev, bnum, num_blocks, max_device_blocks[dev]);
// let the app crash here
*(int *)0x3100 = 0xc0debabe;
debugger("Accessed blocks out of device range!");
//*(int *)0x3100 = 0xc0debabe;
return EINVAL;
}
@ -1787,7 +1789,6 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz
panic("*** asked to do a large locked io that's too hard!\n");
}
if (op & CACHE_READ) {
if (read_phys_blocks(dev, bnum, data, num_blocks, bsize) != 0) {
printf("cache read:read_phys_blocks failed (%s on blocks %Ld:%Ld)!\n",

View File

@ -656,7 +656,7 @@ rootfs_readdir(void *_ns, void *_node, void *_cookie, long *num,
long i;
vnode *vn;
vnode_id vnid;
char *name, *last;
char *name, *last = "";
int sl, rl;
ns = (nspace *) _ns;

View File

@ -159,7 +159,7 @@ int InsertSL(SkipList l, void *key)
{
register int i,k;
SLNode update[MaxNumberOfLevels];
register SLNode p,q;
register SLNode p,q = 0;
int (*compare)() = l->compare;
p = l->header;
@ -262,7 +262,7 @@ int DeleteSL(SkipList l, void *key)
void *SearchSL(SkipList l, void *key)
{
register int k;
register SLNode p,q;
register SLNode p,q = 0;
int (*compare)() = l->compare;
p = l->header;