This fixes a few -Wcast-algin warnings emitted by clang. e.g
mokutil.c:1866:26: error: cast from 'uint8_t ' (aka 'unsigned char ') to 'uint32_t ' (aka 'unsigned int ') increases required alignment
from 1 to 4 [-Werror,-Wcast-align]
secureboot = (int32_t)(uint32_t )data;
^~~~
Casting from uint8_t to uint32_t is undefined behavior and can also lead to
bugs on platforms that require pointers to be aligned to the load size.
I think I was able to duplicate the existing logic, but I was unsure how to test this.
This fixes a few -Wcast-algin warnings emitted by clang. e.g
mokutil.c:1866:26: error: cast from 'uint8_t ' (aka 'unsigned char ') to 'uint32_t ' (aka 'unsigned int ') increases required alignment from 1 to 4 [-Werror,-Wcast-align] secureboot = (int32_t)(uint32_t )data; ^
~~~Casting from uint8_t to uint32_t is undefined behavior and can also lead to bugs on platforms that require pointers to be aligned to the load size.I think I was able to duplicate the existing logic, but I was unsure how to test this.