diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2017-05-25 10:48:57 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2017-06-02 01:58:20 +0200 |
commit | 8db3c2a48549f28e40febae827666fe1730ebcd0 (patch) | |
tree | 248178cb3d6b5f7840d4e4954522ca0a2c2b3093 /Makefile | |
parent | 8274f988d918fa9e1c2ecd45a8c912e75feca1c6 (diff) |
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>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions