mirror of
https://github.com/apache/nuttx.git
synced 2025-01-12 23:18:36 +08:00
kasan/globals: fix compile error
../../../mm/kasan/global.c:58:44: error: type of 'g_global_region' does not match original declaration [-Werror=lto-type-mismatch] 58 | extern const struct kasan_global_region_s *g_global_region[]; | ^ kasan_globals.tmp:3:21: note: 'g_global_region' was previously declared here 3 | const unsigned long g_global_region[] = { | ^ lto1: all warnings being treated as errors Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
e2729f58d4
commit
909bf2dbb4
1 changed files with 5 additions and 2 deletions
|
@ -266,9 +266,12 @@ def create_kasan_file(config: Config, region_list=[]):
|
|||
file.write("\n};")
|
||||
|
||||
# Record kasan region pointer location
|
||||
file.write("\nconst unsigned long g_global_region[] = {\n")
|
||||
file.write("struct kasan_global_region_s;\n")
|
||||
file.write("const struct kasan_global_region_s *g_global_region[] = {\n")
|
||||
for i in range(len(region_list)):
|
||||
file.write("\n(const unsigned long)&globals_region%d," % (i))
|
||||
file.write(
|
||||
"\n(const struct kasan_global_region_s *)&globals_region%d," % (i)
|
||||
)
|
||||
file.write("0x00\n};")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue