On Thu, Mar 17, 2022 at 02:43:40PM +0800, Michael Chang via Grub-devel wrote: > The warning is real as long as dangling pointer to 'tmp_' may be used if > o32 and o64 are both null. However that is not going to happen and can > be ignored safely because the PE_OHDR is being used in a context that > either o32 or o64 must have been properly initialized. Sadly compiler > seems not to always optimize that unused _tmp away so explicit > suppression remain needed here. > > ../util/mkimage.c: In function 'grub_install_generate_image': > ../util/mkimage.c:1422:41: error: dangling pointer to 'tmp_' may be used > [-Werror=dangling-pointer=] > 1422 | PE_OHDR (o32, o64, header_size) = grub_host_to_target32 > (header_size); > ../util/mkimage.c:857:28: note: 'tmp_' declared here > 857 | __typeof__((o64)->field) tmp_; \ > | ^~~~ > > Signed-off-by: Michael Chang <mch...@suse.com>
Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com> Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel