u-boot rk356х (rockchip repository)
#16
Code:
  CC      net/tftp.o
lib/avb/libavb/avb_slot_verify.c: In function 'load_and_verify_vbmeta':
lib/avb/libavb/avb_slot_verify.c:476:40: error: 'found' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  476 |     loaded_partition->partition_name = avb_strdup(found);
      |                                        ^~~~~~~~~~~~~~~~~
lib/avb/libavb/avb_slot_verify.c:299:15: note: 'found' was declared here
  299 |   const char* found;
      |               ^~~~~
  CC      drivers/video/drm/analogix_dp.o
  LD      net/built-in.o
  CC      test/dm/cmd_dm.o
  LD      test/dm/built-in.o
  CC      drivers/video/drm/analogix_dp_reg.o
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:280: lib/avb/libavb/avb_slot_verify.o] エラー 1
make[1]: *** [scripts/Makefile.build:425: lib/avb/libavb] エラー 2
make: *** [Makefile:1305: lib] エラー 2
make: *** 未完了のジョブを待っています....
  LD      drivers/watchdog/built-in.o
  CC      drivers/video/drm/rockchip_lvds.o
  CC      drivers/video/drm/rockchip_panel.o
  LD      drivers/video/drm/built-in.o
  LD      drivers/video/built-in.o
  LD      drivers/built-in.o

Technically speaking that char *found in lib/avg/libavb/avb_slot_verify.c line 299 is being used without being initialized, at least as far as the compiler is concerned. Combined with the -Werror=maybe-uninitialized flag, what would normally be a warning is being treated as an error.

A quick fix would be to add "= NULL" to the declaration on line 299 so it is always initialized, e.g.

char * found = NULL;
  Reply


Messages In This Thread
u-boot rk356х (rockchip repository) - by mara - 07-24-2021, 04:24 PM
RE: u-boot rk356х (rockchip repository) - by ryo - 09-03-2021, 10:17 PM
RE: u-boot rk356х (rockchip repository) - by ryo - 09-04-2021, 12:19 AM
RE: u-boot rk356х (rockchip repository) - by ryo - 09-04-2021, 08:21 AM
RE: u-boot rk356х (rockchip repository) - by humble226 - 12-29-2021, 01:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)