diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-08-12 14:02:06 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-08-15 15:40:14 +0300 |
commit | a8b472598ebc7874651a92f6342c714c37b0f083 (patch) | |
tree | e5281266285ffa27b7239638929dedbbe8125113 /licenses/gnu-gpl-2.0.txt | |
parent | 0268984c0d870a6e772b45e3aa1b01daadd45395 (diff) |
hal: Fix comparison of unsigned integer < 0
The CameraHalManager::getCameraInfo() validates the camera id it
receives from the camera service, and in doing so generates a compiler
error with gcc as the id is an unsigned integer and can never be
negative:
../src/android/camera_hal_manager.cpp: In member function ‘CameraProxy* CameraHalManager::open(unsigned int, const hw_module_t*)’:
../src/android/camera_hal_manager.cpp:89:9: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
if (id < 0 || id >= numCameras()) {
Fix it by removing the unneeded comparison.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'licenses/gnu-gpl-2.0.txt')
0 files changed, 0 insertions, 0 deletions