1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
From 1bc7c0daece11b36abebc48b9113193056289fe6 Mon Sep 17 00:00:00 2001
From: Thuy Tran <thuy.tran.xh@renesas.com>
Date: Tue, 17 Jul 2018 15:01:56 +0700
Subject: [PATCH] Silenced -Wcast-function-type, -Wsizeof-pointer-div and
-Wstringop-truncation options of GCC 8.1
Current GFX source code will get compilation error with GCC 8.1,
because it is defined in makefile to use -Wall to enable all Warnings
check.
-Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation
are new Warnings from GCC 8.
=====================================================================
* Error generated by -Wcast-function-type
rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/module_common.c:43:
kernel-source/include/linux/timer.h: In function 'timer_setup':
error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type]
__setup_timer(timer, (TIMER_FUNC_TYPE)callback,
^
/ssd/thuy/FS2.6/M1/build_m3ulcb_mmp/tmp/work-shared/m3ulcb/kernel-source/include/linux/timer.h:144:25: note: in definition of macro '__setup_timer'
(_timer)->function = (_fn); \
^~~
======================================================================
* Error generated by -Wsizeof-pointer-div
rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/km_apphint.c:229:48: error: division 'sizeof (void *) / sizeof (void)' does not compute the number of array elements [-Werror=sizeof-pointer-div]
#define APPHINT_HELP_ARRAY_SIZE(a) (sizeof((a))/(sizeof((a[0]))))
^
rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/env/linux/km_apphint.c:233:49: note: in expansion of macro 'APPHINT_HELP_ARRAY_SIZE'
{APPHINT_ID_ ## a, APPHINT_DATA_TYPE_ ## b, e, APPHINT_HELP_ARRAY_SIZE(e) },
^~~~~~~~~~~~~~~~~~~~~~~
======================================================================
* Error generated by -Wstringop-truncation
rogue_km/binary_r8a7796_linux_release/target_aarch64/kbuild/services/server/devices/rgx/rgxfwutils.c:1294:2: error: 'strncat' output truncated before terminating nul copying 7 bytes from a string of the same length [-Werror=stringop-truncation]
strncat(sCCBCtlName, sAppend, APPEND_STR_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Thuy Tran <thuy.tran.xh@renesas.com>
---
build/linux/buildvars.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/linux/buildvars.mk b/build/linux/buildvars.mk
index a871d37..ddf12eb 100644
--- a/build/linux/buildvars.mk
+++ b/build/linux/buildvars.mk
@@ -51,7 +51,7 @@
# These flags are used for kernel, User C and User C++
#
-COMMON_FLAGS := -W -Wall
+COMMON_FLAGS := -W -Wall -Wno-cast-function-type -Wno-sizeof-pointer-div -Wno-stringop-truncation
# Enable 64-bit file & memory handling on 32-bit systems.
#
--
2.7.4
|