Skip to content

gcc13 warning: FFDC pointer alignment #1

@shenki

Description

@shenki
In file included from libekb.C:19:
libekb.C: In function 'void libekb_get_sbe_ffdc(FFDC&, const sbeFfdcPacketType&, int)':
./hwpf/fapi2/include/error_info/set_sbe_error.H:1493:86: warning: converting a packed 'fapi2::sbeFfdc_t' pointer (alignment 1) to a 'const uint32_t' {aka 'const unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
 1493 |    fapi2::variable_buffer l_buffer((uint32_t*)FFDC_BUFFER, size_bytes/4, size_bytes*8);\
      |                                                                                      ^
libekb.C:258:9: note: in expansion of macro 'FAPI_SET_SBE_ERROR'
  258 |         FAPI_SET_SBE_ERROR(rc, ffdc_pkt.fapiRc, ffdc_endian.data(), proc_index);
      |         ^~~~~~~~~~~~~~~~~~
In file included from ./hwpf/fapi2/include/plat/plat_utils.H:27,
                 from libekb.C:11:
./ekb/hwpf/fapi2/include/error_info_defs.H:53:8: note: defined here
   53 | struct sbeFfdc_t
      |        ^~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions