Skip to content

Conversation

@osteffenrh
Copy link
Contributor

Description

Small fixes to allow building with GCC15 which defaults to C23 standard,
which has stricter warnings on type casts.

This is needed to use the new Fedora 43 images in the CI (for the Linux) builds.

  • Breaking change?
  • Impacts security?
  • Includes tests?

How This Was Tested

Running builds locally.

Integration Instructions

GCC 15 enforces stricter type checking for function pointers. When
passing SPDM transport layer callbacks to
libspdm_register_transport_layer_func, the function pointer types are
incompatible due to differences in boolean parameter types.

The EDK2 uses BOOLEAN (UINT8) while libspdm uses C99 bool (_Bool).
Although these types have the same size and representation,
GCC 15 treats them as incompatible.

Add explicit casts to libspdm_transport_encode_message_func and
libspdm_transport_decode_message_func at the call site to resolve
the type mismatch. This is safe as the types have identical binary
representation and the functions are only called through these
pointers by libspdm.

Signed-off-by: Oliver Steffen <[email protected]>
GCC 15 enforces stricter type checking for function pointers. When
passing EFI_PERIODIC_CALLBACK and EFI_EXCEPTION_CALLBACK to
ManageIdtEntryTable, explicit casts to CALLBACK_FUNC are required to
avoid incompatible pointer type errors.

Add explicit casts at the call sites in RegisterPeriodicCallback and
RegisterExceptionCallback functions.

Signed-off-by: Oliver Steffen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants