HomeFreeBSD

Add missing default case to capable(..) function definition

Description

Add missing default case to capable(..) function definition

By definition (enum __drm_capabilities), cases other than CAP_SYS_ADMIN
aren't possible. Add in a KASSERT safety belt and return false in
!INVARIANTS case if an invalid value is passed in, as it would be a
programmer error.

This fixes a -Wreturn-type error with gcc 5.3.0.

Differential Revision: https://reviews.freebsd.org/D7188
MFC after: 1 week
Reported by: devel/amd64-gcc (5.3.0)
Reviewed by: dumbbell
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
ngieAuthored on
Reviewer
dumbbell
Parents
rS302576: (Re-do r302574 with corrected commit message..)
Branches
Unknown
Tags
Unknown