nvgpu: add -Wshadow compile flag to posix build

hvrtos/hypervisor added default cflags -Wshadow which is required by
AUTOSAR M3-4-1. The patch adds the flag to posix build to make sure the
code pass build on hvrtos.

Jira GVSCI-9976

Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Change-Id: If43281689a2aea95e4a768f59014f787f2e9ee23
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2728216
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Richard Zhao
2022-06-12 21:00:15 -07:00
committed by mobile promotions
parent 9890a185e0
commit 7af53dab3d
4 changed files with 19 additions and 18 deletions

View File

@@ -70,6 +70,7 @@ _NV_TOOLCHAIN_CFLAGS += \
-Wmissing-braces -Wpointer-arith -Wundef \
-Wconversion -Wsign-conversion \
-Wformat-security \
-Wshadow \
-Wmissing-declarations -Wredundant-decls -Wimplicit-fallthrough
endif