Skip to content

Assorted build fixes for GCC 15 and C23#1457

Merged
mcb30 merged 5 commits intomasterfrom
c23
Apr 27, 2025
Merged

Assorted build fixes for GCC 15 and C23#1457
mcb30 merged 5 commits intomasterfrom
c23

Conversation

@mcb30
Copy link
Copy Markdown
Member

@mcb30 mcb30 commented Apr 27, 2025

No description provided.

mcb30 and others added 5 commits April 27, 2025 18:40
GCC 15 helpfully reports mismatched #ifdef and #define lines in header
guards.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
GCC 15 defaults to C23, which reserves bool, true, and false as
keywords.  Avoid using these as parameter or variable names.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
The legacy NIC drivers do not consistently take a second parameter in
their disable function.  We currently use an unsafe function wrapper
that declares no parameters, and rely on the ABI allowing a second
parameter to be silently ignored if not expected by the caller.  As of
GCC 15, this hack results in an incompatible pointer type warning.

Fix by removing the hack, and instead updating all relevant legacy NIC
drivers to take an unused second parameter in their disable function.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
GCC 15 generates a warning when a string initializer is too large to
allow for a trailing NUL terminator byte.  This type of initializer is
fairly common in signature strings such as ACPI table identifiers.

Fix by disabling the warning.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
@mcb30 mcb30 merged commit bd4ca67 into master Apr 27, 2025
4 checks passed
@mcb30 mcb30 deleted the c23 branch April 27, 2025 18:33
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.

2 participants