Files
linux-nv-oot/configs/Makefile.config.noble
Jon Hunter af058279c6 drivers: Flag mixed declarations and code
Adding the build flag '-Werror=declaration-after-statement' to prevent
mixing variable definitions within the body of code. Ideally, we would
enable this for all kernels, but in the latest upstream Linux kernels
this flag has been removed from the kernel build to allow for scope
based declarations in some contexts. However, even in the upstream
kernel declaring variables at the start of the scope is recommended. Add
this flag for noble kernels to ensure that this recommendation is
followed for OOT drivers.

Link: https://lore.kernel.org/lkml/20230612093537.693926033@infradead.org/
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I29648ec41d5a5afb06a41b209c025c7b3fa77e85
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338231
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00

382 B