libcamera: control_serializer: Use explicit ControlTypeNone case
Replace the default case with an explicit ControlTypeNone case in ControlSerializer::load() to catch omissions when adding new control types. A return statement needs to be added to the end of the function to avoid gcc incorrectly reporting that some exit paths don't contain a return statement. The compiler will still warn that not all cases are handled when adding a new control type. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -361,9 +361,11 @@ ControlValue ControlSerializer::load<ControlValue>(ControlType type,
|
||||
return ControlValue(value);
|
||||
}
|
||||
|
||||
default:
|
||||
case ControlTypeNone:
|
||||
return ControlValue();
|
||||
}
|
||||
|
||||
return ControlValue();
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user