mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-18 04:15:32 +00:00
libbtrfsutil: declare struct btrfs_ioctl_search_header as packed
The search header is used for extracting data from buffer returned by the SEARCH_TREE ioctl and needs special access helpers as there are no guarantees about alignment. With -fsanitize=alignment this still leads to an error because address of the members is taken, regardless of the unaligned access method is used (both temporary memcpy to a structure or the packed struct cast). Add another hint to compiler that the structure is special and add the packed attribute. This fixes the sanitizer error. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
06c7012a54
commit
d8c7a5e6f4