Avoid casts as lvalues.
This commit is contained in:
parent
65748e401c
commit
2ed75712dc
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user