mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
Running Sparse on nilfs-utils generates warnings in "include/linux/nilfs2_ondisk.h" because standard user-space environments lack the restricted type definitions for double- underscored kernel macros (e.g., __le32_to_cpu). Alias these kernel macros to the local versions in compat.h that carry the necessary __force cast attributes. Reorder header includes to ensure compat.h is parsed before nilfs2_ondisk.h so that the aliases take effect during static analysis. Additionally, pre-include <asm/byteorder.h> in compat.h to prevent macro redefinition warnings caused by the include order change. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>