WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@mikebeaton
Copy link
Member

Description

THIS IS A TEST COMMIT - DO NOT MERGE

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

How This Was Tested

CI

Integration Instructions

N/A

@mikebeaton mikebeaton force-pushed the ci-clangpdb branch 5 times, most recently from afb9e9d to af06f2a Compare December 8, 2025 07:09
The compiler is not spotting that the inverse of the same conditions has
already been checked, therefore either the 'if' or the 'else if' has to
happen. On the other hand, it is misleading coding to use 'else if' for
something that has to happen given earlier checks.

This fixes the misleading coding and the warning.

We definitely want to keep the warning enabled, as it has caught several
genuine cases of uninitialized use.

Signed-off-by: Mike Beaton <[email protected]>
@mikebeaton mikebeaton force-pushed the ci-clangpdb branch 5 times, most recently from db0ebb1 to 3a45dcb Compare December 9, 2025 23:26
From experimentation, for RedfishPkg to compile using CLANGPDB we need to
both apply the GLOBAL_USED macro found in SecurityPlg and CryptoPkg, and
make an external refernce to _fltused inside each library which needs it.

Without both these changes, aggressive LTO optimization is presumably
deciding that _fltused is not needed even though by the time we finally
come to link it is, and both these libraries fail with:

lld-link: error: undefined symbol: _fltused

Signed-off-by: Mike Beaton <[email protected]>
THIS IS A TEST COMMIT - DO NOT MERGE

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Mike Beaton <[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.

1 participant