coreboot-kgpe-d16/util/ifdtool
Ronald G. Minnich 8db3c2a485 ifdtool: avoid potential unaligned pointer usage
In get_region, ifdtool assigns a not-known-to-be-aligned
pointer to a uint32_t *. Now you know and I know that it is
almost certainly aligned, but clang on OSX doesn't like this,
and it's a dicey thing to do in any event, just waiting
to hit someone hard at some future date.

Assign the pointer to a void * and use memmove to copy
the value to a uint32_t.

This usage is more portable to all little-endian architectures,
now, but is still not endian-safe. I doubt we'll ever care.

Change-Id: Ifb2f260c3363ab0f5b4a59e5a4e0b5ecf049fa96
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: https://review.coreboot.org/19921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-02 01:58:20 +02:00
..
Makefile ifdtool/Makefile: use static dependencies 2016-09-12 20:03:28 +02:00
ifdtool.c ifdtool: avoid potential unaligned pointer usage 2017-06-02 01:58:20 +02:00
ifdtool.h ifdtool: Add option to specify platform (-p) quirks 2016-11-08 23:11:29 +01:00