mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
The camera driver fails to build if the compiler option
-Werror=declaration-after-statement is enabled and the following error
is seen ...
drivers/media/platform/tegra/camera/tegracam_ctrls.c:1120:17: error:
ISO C90 forbids mixed declarations and code
[-Werror=declaration-after-statement]
1120 | int index = tegracam_get_ctrl_index(cid);
| ^~~
JIRA CAMERASW-32529
Fix this by moving the declaration of the 'index' and 'size' variables
to the start of the for-loop code block.
Change-Id: I69590c147e8effd031b962606a077856ad4f8d07
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316537
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mike Jia <mijia@nvidia.com>