Fix GCC 5 maybe-uninitialized warnings.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Fixes #12020
This commit is contained in:
parent
949cf6ac85
commit
1e6dd3feed
@ -496,7 +496,7 @@ static void
|
|||||||
atom_op_add(atom_exec_context *ctx, int *ptr, int arg)
|
atom_op_add(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++);
|
uint8 attr = U8((*ptr)++);
|
||||||
uint32 dst, src, saved;
|
uint32 dst, src, saved = 0;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
src = atom_get_src(ctx, attr, ptr);
|
src = atom_get_src(ctx, attr, ptr);
|
||||||
@ -513,7 +513,7 @@ static void
|
|||||||
atom_op_and(atom_exec_context *ctx, int *ptr, int arg)
|
atom_op_and(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++);
|
uint8 attr = U8((*ptr)++);
|
||||||
uint32 dst, src, saved;
|
uint32 dst, src, saved = 0;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
src = atom_get_src(ctx, attr, ptr);
|
src = atom_get_src(ctx, attr, ptr);
|
||||||
@ -559,7 +559,7 @@ static void
|
|||||||
atom_op_clear(atom_exec_context *ctx, int *ptr, int arg)
|
atom_op_clear(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++);
|
uint8 attr = U8((*ptr)++);
|
||||||
uint32 saved;
|
uint32 saved = 0;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
attr &= 0x38;
|
attr &= 0x38;
|
||||||
attr |= atom_def_dst[attr>>3]<<6;
|
attr |= atom_def_dst[attr>>3]<<6;
|
||||||
@ -684,7 +684,7 @@ static void
|
|||||||
atom_op_mask(atom_exec_context *ctx, int *ptr, int arg)
|
atom_op_mask(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++);
|
uint8 attr = U8((*ptr)++);
|
||||||
uint32 dst, mask, src, saved;
|
uint32 dst, mask, src, saved = 0;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
mask = atom_get_src_direct(ctx, ((attr >> 3) & 7), ptr);
|
mask = atom_get_src_direct(ctx, ((attr >> 3) & 7), ptr);
|
||||||
@ -740,7 +740,7 @@ static void
|
|||||||
atom_op_or(atom_exec_context *ctx, int *ptr, int arg)
|
atom_op_or(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++);
|
uint8 attr = U8((*ptr)++);
|
||||||
uint32 dst, src, saved;
|
uint32 dst, src, saved = 0;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
src = atom_get_src(ctx, attr, ptr);
|
src = atom_get_src(ctx, attr, ptr);
|
||||||
@ -848,7 +848,7 @@ atom_op_setregblock(atom_exec_context *ctx, int *ptr, int arg)
|
|||||||
static void atom_op_shift_left(atom_exec_context *ctx, int *ptr, int arg)
|
static void atom_op_shift_left(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++), shift;
|
uint8 attr = U8((*ptr)++), shift;
|
||||||
uint32 saved, dst;
|
uint32 saved = 0, dst;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
attr &= 0x38;
|
attr &= 0x38;
|
||||||
attr |= atom_def_dst[attr >> 3] << 6;
|
attr |= atom_def_dst[attr >> 3] << 6;
|
||||||
@ -866,7 +866,7 @@ static void atom_op_shift_left(atom_exec_context *ctx, int *ptr, int arg)
|
|||||||
static void atom_op_shift_right(atom_exec_context *ctx, int *ptr, int arg)
|
static void atom_op_shift_right(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++), shift;
|
uint8 attr = U8((*ptr)++), shift;
|
||||||
uint32 saved, dst;
|
uint32 saved = 0, dst;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
attr &= 0x38;
|
attr &= 0x38;
|
||||||
attr |= atom_def_dst[attr >> 3] << 6;
|
attr |= atom_def_dst[attr >> 3] << 6;
|
||||||
@ -884,7 +884,7 @@ static void atom_op_shift_right(atom_exec_context *ctx, int *ptr, int arg)
|
|||||||
static void atom_op_shl(atom_exec_context *ctx, int *ptr, int arg)
|
static void atom_op_shl(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++), shift;
|
uint8 attr = U8((*ptr)++), shift;
|
||||||
uint32 saved, dst;
|
uint32 saved = 0, dst;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
uint32 dst_align = atom_dst_to_src[(attr >> 3) & 7][(attr >> 6) & 3];
|
uint32 dst_align = atom_dst_to_src[(attr >> 3) & 7][(attr >> 6) & 3];
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
@ -905,7 +905,7 @@ static void atom_op_shl(atom_exec_context *ctx, int *ptr, int arg)
|
|||||||
static void atom_op_shr(atom_exec_context *ctx, int *ptr, int arg)
|
static void atom_op_shr(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++), shift;
|
uint8 attr = U8((*ptr)++), shift;
|
||||||
uint32 saved, dst;
|
uint32 saved = 0, dst;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
uint32 dst_align = atom_dst_to_src[(attr >> 3) & 7][(attr >> 6) & 3];
|
uint32 dst_align = atom_dst_to_src[(attr >> 3) & 7][(attr >> 6) & 3];
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
@ -927,7 +927,7 @@ static void
|
|||||||
atom_op_sub(atom_exec_context *ctx, int *ptr, int arg)
|
atom_op_sub(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++);
|
uint8 attr = U8((*ptr)++);
|
||||||
uint32 dst, src, saved;
|
uint32 dst, src, saved = 0;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
src = atom_get_src(ctx, attr, ptr);
|
src = atom_get_src(ctx, attr, ptr);
|
||||||
@ -984,7 +984,7 @@ static void
|
|||||||
atom_op_xor(atom_exec_context *ctx, int *ptr, int arg)
|
atom_op_xor(atom_exec_context *ctx, int *ptr, int arg)
|
||||||
{
|
{
|
||||||
uint8 attr = U8((*ptr)++);
|
uint8 attr = U8((*ptr)++);
|
||||||
uint32 dst, src, saved;
|
uint32 dst, src, saved = 0;
|
||||||
int dptr = *ptr;
|
int dptr = *ptr;
|
||||||
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
|
||||||
src = atom_get_src(ctx, attr, ptr);
|
src = atom_get_src(ctx, attr, ptr);
|
||||||
|
@ -1062,7 +1062,7 @@ BPlusTree::_FindKey(const bplustree_node* node, const uint8* key,
|
|||||||
for (int16 first = 0, last = node->NumKeys() - 1; first <= last;) {
|
for (int16 first = 0, last = node->NumKeys() - 1; first <= last;) {
|
||||||
uint16 i = (first + last) >> 1;
|
uint16 i = (first + last) >> 1;
|
||||||
|
|
||||||
uint16 searchLength;
|
uint16 searchLength = 0;
|
||||||
uint8* searchKey = node->KeyAt(i, &searchLength);
|
uint8* searchKey = node->KeyAt(i, &searchLength);
|
||||||
if (searchKey + searchLength + sizeof(off_t) + sizeof(uint16)
|
if (searchKey + searchLength + sizeof(off_t) + sizeof(uint16)
|
||||||
> (uint8*)node + fNodeSize
|
> (uint8*)node + fNodeSize
|
||||||
@ -2732,7 +2732,7 @@ TreeIterator::Traverse(int8 direction, void* key, uint16* keyLength,
|
|||||||
if (node->all_key_count == 0)
|
if (node->all_key_count == 0)
|
||||||
RETURN_ERROR(B_ERROR); // B_ENTRY_NOT_FOUND ?
|
RETURN_ERROR(B_ERROR); // B_ENTRY_NOT_FOUND ?
|
||||||
|
|
||||||
uint16 length;
|
uint16 length = 0;
|
||||||
uint8* keyStart = node->KeyAt(fCurrentKey, &length);
|
uint8* keyStart = node->KeyAt(fCurrentKey, &length);
|
||||||
if (keyStart + length + sizeof(off_t) + sizeof(uint16)
|
if (keyStart + length + sizeof(off_t) + sizeof(uint16)
|
||||||
> (uint8*)node + fTree->fNodeSize
|
> (uint8*)node + fTree->fNodeSize
|
||||||
@ -2991,7 +2991,7 @@ bplustree_node::CheckIntegrity(uint32 nodeSize) const
|
|||||||
DEBUGGER(("invalid node: key/length count"));
|
DEBUGGER(("invalid node: key/length count"));
|
||||||
|
|
||||||
for (int32 i = 0; i < NumKeys(); i++) {
|
for (int32 i = 0; i < NumKeys(); i++) {
|
||||||
uint16 length;
|
uint16 length = 0;
|
||||||
uint8* key = KeyAt(i, &length);
|
uint8* key = KeyAt(i, &length);
|
||||||
if (key + length + sizeof(off_t) + sizeof(uint16)
|
if (key + length + sizeof(off_t) + sizeof(uint16)
|
||||||
> (uint8*)this + nodeSize
|
> (uint8*)this + nodeSize
|
||||||
|
@ -492,7 +492,7 @@ status_t
|
|||||||
LargeMemoryPhysicalPageMapper::GetPage(phys_addr_t physicalAddress,
|
LargeMemoryPhysicalPageMapper::GetPage(phys_addr_t physicalAddress,
|
||||||
addr_t* virtualAddress, void** handle)
|
addr_t* virtualAddress, void** handle)
|
||||||
{
|
{
|
||||||
PhysicalPageSlot* slot;
|
PhysicalPageSlot* slot = NULL;
|
||||||
status_t error = GetSlot(true, slot);
|
status_t error = GetSlot(true, slot);
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
@ -2209,7 +2209,7 @@ init_node_tree(void)
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
device_node* node;
|
device_node* node = NULL;
|
||||||
if (register_node(NULL, DEVICE_MANAGER_ROOT_NAME, attrs, NULL, &node)
|
if (register_node(NULL, DEVICE_MANAGER_ROOT_NAME, attrs, NULL, &node)
|
||||||
!= B_OK) {
|
!= B_OK) {
|
||||||
dprintf("Cannot register Devices Root Node\n");
|
dprintf("Cannot register Devices Root Node\n");
|
||||||
|
@ -4121,7 +4121,7 @@ vfs_get_vnode_from_path(const char* path, bool kernel, struct vnode** _vnode)
|
|||||||
extern "C" status_t
|
extern "C" status_t
|
||||||
vfs_get_vnode(dev_t mountID, ino_t vnodeID, bool canWait, struct vnode** _vnode)
|
vfs_get_vnode(dev_t mountID, ino_t vnodeID, bool canWait, struct vnode** _vnode)
|
||||||
{
|
{
|
||||||
struct vnode* vnode;
|
struct vnode* vnode = NULL;
|
||||||
|
|
||||||
status_t status = get_vnode(mountID, vnodeID, &vnode, canWait, false);
|
status_t status = get_vnode(mountID, vnodeID, &vnode, canWait, false);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
|
@ -568,7 +568,7 @@ _user_register_messaging_service(sem_id lockSem, sem_id counterSem)
|
|||||||
if (!sMessagingService->Lock())
|
if (!sMessagingService->Lock())
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
area_id areaID;
|
area_id areaID = 0;
|
||||||
status_t error = sMessagingService->RegisterService(lockSem, counterSem,
|
status_t error = sMessagingService->RegisterService(lockSem, counterSem,
|
||||||
areaID);
|
areaID);
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ parse_parameter(struct driver_parameter *parameter, char **_pos, int32 level)
|
|||||||
status = get_word(&pos, ¶meter->name, NO_ASSIGNMENT, true);
|
status = get_word(&pos, ¶meter->name, NO_ASSIGNMENT, true);
|
||||||
if (status == CONTINUE_PARAMETER) {
|
if (status == CONTINUE_PARAMETER) {
|
||||||
while (status == CONTINUE_PARAMETER) {
|
while (status == CONTINUE_PARAMETER) {
|
||||||
char **newArray, *value;
|
char **newArray, *value = NULL;
|
||||||
status = get_word(&pos, &value, parameter->value_count == 0
|
status = get_word(&pos, &value, parameter->value_count == 0
|
||||||
? ALLOW_ASSIGNMENT : IGNORE_ASSIGNMENT, false);
|
? ALLOW_ASSIGNMENT : IGNORE_ASSIGNMENT, false);
|
||||||
if (status < B_OK)
|
if (status < B_OK)
|
||||||
|
Loading…
Reference in New Issue
Block a user