diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index d407b249750..eda6810605f 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -389,8 +389,8 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent, oidp->oid_kind = CTLFLAG_DYN | kind; if ((kind & CTLTYPE) == CTLTYPE_NODE) { /* Allocate space for children */ - SYSCTL_CHILDREN(oidp) = malloc(sizeof(struct sysctl_oid_list), - M_SYSCTLOID, M_WAITOK); + SYSCTL_CHILDREN_SET(oidp, malloc(sizeof(struct sysctl_oid_list), + M_SYSCTLOID, M_WAITOK)); SLIST_INIT(SYSCTL_CHILDREN(oidp)); } else { oidp->oid_arg1 = arg1; @@ -1208,7 +1208,7 @@ sysctl_root(SYSCTL_HANDLER_ARGS) return EINVAL; if ((oid->oid_kind & CTLTYPE) == CTLTYPE_NODE) { - (int *)arg1 += indx; + arg1 = (int *)arg1 + indx; arg2 -= indx; } else { arg1 = oid->oid_arg1; diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index b883ac0331f..175c2bd5fed 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -636,7 +636,7 @@ kseq_assign(struct kseq *kseq) struct kse *ke; do { - (volatile struct kse *)ke = kseq->ksq_assigned; + *(volatile struct kse **)&ke = kseq->ksq_assigned; } while(!atomic_cmpset_ptr(&kseq->ksq_assigned, ke, NULL)); for (; ke != NULL; ke = nke) { nke = ke->ke_assign; @@ -661,7 +661,7 @@ kseq_notify(struct kse *ke, int cpu) * Place a KSE on another cpu's queue and force a resched. */ do { - (volatile struct kse *)ke->ke_assign = kseq->ksq_assigned; + *(volatile struct kse **)&ke->ke_assign = kseq->ksq_assigned; } while(!atomic_cmpset_ptr(&kseq->ksq_assigned, ke->ke_assign, ke)); pcpu = pcpu_find(cpu); td = pcpu->pc_curthread; diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 0b016f1e01f..2e807c91278 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -456,8 +456,7 @@ oshmctl(td, uap) goto done2; break; default: - /* XXX casting to (sy_call_t *) is bogus, as usual. */ - error = ((sy_call_t *)shmctl)(td, uap); + error = shmctl(td, (struct shmctl_args *)uap); break; } done2: