[libcamera-devel] [PATCH] libcamera: control_serializer: Use explicit ControlTypeNone case

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Mar 1 17:02:54 CET 2020


Replace the default case with an explicit ControlTypeNone case in
ControlSerializer::load() to catch ommissions when adding new control
types.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/libcamera/control_serializer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp
index 5537c5466025..e78fca88cfea 100644
--- a/src/libcamera/control_serializer.cpp
+++ b/src/libcamera/control_serializer.cpp
@@ -361,7 +361,7 @@ ControlValue ControlSerializer::load<ControlValue>(ControlType type,
 		return ControlValue(value);
 	}
 
-	default:
+	case ControlTypeNone:
 		return ControlValue();
 	}
 }
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list