Kernel/servers/drivers: resolve a few warnings
Flagged by clang 3.1.
This commit is contained in:
parent
1972ccefae
commit
fa805ebd1e
3 changed files with 8 additions and 6 deletions
|
@ -166,7 +166,7 @@ MD5Final (digest, ctx)
|
|||
putu32(ctx->buf[1], digest + 4);
|
||||
putu32(ctx->buf[2], digest + 8);
|
||||
putu32(ctx->buf[3], digest + 12);
|
||||
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
|
||||
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
|
||||
}
|
||||
|
||||
#ifndef ASM_MD5
|
||||
|
|
|
@ -446,7 +446,7 @@ static int do_sync_ipc(struct proc * caller_ptr, /* who made the call */
|
|||
|| !(callname = ipc_call_names[call_nr])) {
|
||||
#if DEBUG_ENABLE_IPC_WARNINGS
|
||||
printf("sys_call: trap %d not allowed, caller %d, src_dst %d\n",
|
||||
call_nr, proc_nr(caller_ptr), src_dst_p);
|
||||
call_nr, proc_nr(caller_ptr), src_dst_e);
|
||||
#endif
|
||||
return(ETRAPDENIED); /* trap denied by mask or kernel */
|
||||
}
|
||||
|
|
|
@ -79,12 +79,13 @@ devman_device_add_event(struct devman_device* dev)
|
|||
int res;
|
||||
|
||||
event = malloc(sizeof(struct devman_event));
|
||||
memset(event, 0, sizeof(event));
|
||||
|
||||
if (event == NULL) {
|
||||
panic("devman_device_remove_event: out of memory\n");
|
||||
}
|
||||
|
||||
|
||||
memset(event, 0, sizeof(*event));
|
||||
|
||||
strcat(event->data, ADD_STRING);
|
||||
|
||||
res = devman_generate_path(event->data, DEVMAN_STRING_LEN - 11 , dev);
|
||||
|
@ -111,12 +112,13 @@ devman_device_remove_event(struct devman_device* dev)
|
|||
int res;
|
||||
|
||||
event = malloc(sizeof(struct devman_event));
|
||||
memset(event, 0, sizeof(event));
|
||||
|
||||
if (event == NULL) {
|
||||
panic("devman_device_remove_event: out of memory\n");
|
||||
}
|
||||
|
||||
|
||||
memset(event, 0, sizeof(*event));
|
||||
|
||||
strcat(event->data, REMOVE_STRING);
|
||||
|
||||
res = devman_generate_path(event->data, DEVMAN_STRING_LEN-11, dev);
|
||||
|
|
Loading…
Reference in a new issue