[PATCH] ci: Add missing __GNUC__ define to silence false-positive cppcheck errror

7 views
Skip to first unread message

Jan Kiszka

unread,
Dec 10, 2020, 3:38:24 AM12/10/20
to efibootguard-dev
From: Jan Kiszka <jan.k...@siemens.com>

Addresses

[drivers/watchdog/ipc4x7e_wdt.c:127]: (error) Shifting 32-bit value by 32 bits is undefined behaviour

which is caused by UINT64 being classified wrongly as 32-bit type.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
.travis-build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis-build.sh b/.travis-build.sh
index 307dea7..197cc52 100755
--- a/.travis-build.sh
+++ b/.travis-build.sh
@@ -143,7 +143,7 @@ case "$TARGET_EFFECTIVE" in
-I /usr/include/x86_64-linux-gnu \
-I /usr/lib/gcc/x86_64-linux-gnu/4.8/include"

- cpp_conf="-U__WINT_TYPE__"
+ cpp_conf="-U__WINT_TYPE__ -U__GNUC__"
# Exit code '1' is returned if arguments are not valid or if no input
# files are provided. Compare 'cppcheck --help'.
exec /opt/cppcheck/bin/cppcheck -f -q --error-exitcode=2 \
--
2.26.2
Reply all
Reply to author
Forward
0 new messages