#### failed to build some targets (01:49 (mm:ss)) #### 作者: timer_s 时间: 2021-9-8 13:00
tools/loaderimage.c: In function ‘main’:
tools/loaderimage.c:116:28: warning: variable ‘name’ set but not used [-Wunused-but-set-variable]
116 | char *magic, *version, *name;
| ^~~~
tools/loaderimage.c:116:18: warning: variable ‘version’ set but not used [-Wunused-but-set-variable]
116 | char *magic, *version, *name;
| ^~~~~~~
tools/loaderimage.c:339:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
339 | fread(hdr, sizeof(struct tag_second_loader_hdr), 1, fi);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
编译uboot这里报了警告作者: timer_s 时间: 2021-9-8 13:06
tools/boot_merger.c: In function ‘initOpts’:
tools/boot_merger.c:490:52: warning: ‘_loader_v’ directive output may be truncated writing 9 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
490 | snprintf(gOpts.outPath, sizeof(gOpts.outPath), "%s_loader_v%d.%02d.%d%02d.bin", gOpts.chip, v0, v1, v2, v3);
| ^~~~~~~~~
In file included from /usr/include/stdio.h:867,
from /home/timer/work/share/rk3399-android-8.1.git-20210108/rk3399-android-8.1/u-boot/include/compiler.h:25,
from /home/timer/work/share/rk3399-android-8.1.git-20210108/rk3399-android-8.1/u-boot/include/libfdt_env.h:12,
from <command-line>:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 22 and 315 bytes into a destination of size 256
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/boot_merger.c: In function ‘main’:
tools/boot_merger.c:882:11: warning: array subscript 20 is outside array bounds of ‘char[20]’ [-Warray-bounds]
882 | str[len] = 0;
| ~~~~~~~~~^~~
tools/boot_merger.c:920:7: note: while referencing ‘name’
920 | char name[MAX_NAME_LEN];