mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Using the DATA_SIZE() macro gets rid of the following GCC8 compile
warning:
boot.c: In function ‘boot_init_fba_stage0’:
boot.c:120:2: warning: ‘memcpy’ forming offset [2, 152] is out of the
bounds [0, 1] of object ‘_binary_fba0_bin_start’ with type ‘char’
[-Warray-bounds]
memcpy(stage0, DATA_ADDR(fba0), sizeof(*stage0));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from boot.c:18:
../boot/data.h:24:13: note: ‘_binary_fba0_bin_start’ declared here
extern char _binary_fba0_bin_start;
^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>