ndctl
ndctl copied to clipboard
compiler warning: taking address of packed member of a structure
gcc version 9.2.1 reports warnings about possible unaligned pointer values when compiling ndctl. i.e., intel.c: In function ‘intel_dimm_cmd_new_smart_threshold’: intel.c:272:25: warning: taking address of packed member of ‘struct nd_intel_smart_threshold’ may result in an unaligned pointer value [-Waddress-of-packed-member] 272 | cmd->firmware_status = &cmd->intel->thresh.status; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ intel.c: In function ‘intel_dimm_cmd_new_smart_set_threshold’: intel.c:302:25: warning: taking address of packed member of ‘struct nd_intel_smart_set_threshold’ may result in an unaligned pointer value [-Waddress-of-packed-member] 302 | cmd->firmware_status = &set_thresh->status; | ^~~~~~~~~~~~~~~~~~~ intel.c: In function ‘intel_new_smart_inject’: intel.c:363:25: warning: taking address of packed member of ‘struct nd_intel_smart_inject’ may result in an unaligned pointer value [-Waddress-of-packed-member] 363 | cmd->firmware_status = &cmd->intel->inject.status; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ intel.c: In function ‘intel_dimm_cmd_new_fw_get_info’: intel.c:471:25: warning: taking address of packed member of ‘struct nd_intel_fw_info’ may result in an unaligned pointer value [-Waddress-of-packed-member] 471 | cmd->firmware_status = &cmd->intel->info.status; | ^~~~~~~~~~~~~~~~~~~~~~~~ intel.c: In function ‘intel_dimm_cmd_new_fw_start’: intel.c:543:25: warning: taking address of packed member of ‘struct nd_intel_fw_start’ may result in an unaligned pointer value [-Waddress-of-packed-member] 543 | cmd->firmware_status = &cmd->intel->start.status; | ^~~~~~~~~~~~~~~~~~~~~~~~~
This may impact performance on some architectures and possibly not work on others.
Should be fixed since v68