HomeFreeBSD

vmm_dev: work around a bogus error with gcc 6.3.0

Description

vmm_dev: work around a bogus error with gcc 6.3.0

The error is:
vmm_dev.c: In function 'alloc_memseg':
vmm_dev.c:261:11: error: null argument where non-null required (argument 1) [-Werror=nonnull]

Apparently, the gcc is unable to figure out that if a ternary operator
produced a non-NULL value once, then the operator with exactly the same
operands would produce the same value again.

MFC after: 1 week

Details

Provenance
avgAuthored on
Parents
rS312530: MFC r311517: Add some more mode page fields.
Branches
Unknown
Tags
Unknown