1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00
Files
u-boot-megous/lib
Heinrich Schuchardt a1b633df55 lib: uuid: alignment error in gen_rand_uuid()
Packed structures like struct uuid are not aligned. GCC 9.1 therefore
throws an error when trying to compile gen_rand_uuid().

lib/uuid.c: In function ‘gen_rand_uuid’:
lib/uuid.c:244:2: error: converting a packed ‘struct uuid’ pointer
(alignment 1) to a ‘unsigned int’ pointer (alignment 4) may result in
an unaligned pointer value [-Werror=address-of-packed-member]
  244 |  unsigned int *ptr = (unsigned int *)&uuid;
      |  ^~~~~~~~

Generate the uuid in a properly aligned buffer.

The byte order of a random number should not matter. Do not call
cpu_to_be32() to change the byte order.

Reported-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-07-29 09:32:13 -04:00
..
2019-04-03 10:26:46 -04:00
2019-07-10 16:52:58 -06:00
2019-07-10 16:52:58 -06:00
2018-06-13 07:49:12 -04:00
2019-02-02 08:19:17 -05:00
2018-09-05 16:02:34 -04:00
2019-06-05 09:16:32 -07:00
2019-06-04 22:09:26 +02:00
2019-02-19 08:55:43 -05:00
2019-05-05 08:48:50 -04:00