Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CLANG build errors #345

Merged
merged 2 commits into from
May 14, 2024
Merged

Fix CLANG build errors #345

merged 2 commits into from
May 14, 2024

Conversation

kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented May 13, 2024

Preface

Please ensure you have read the contribution docs prior
to submitting the pull request. In particular,
pull request guidelines.

Description

When building with CLANG/CLANGPDB, the compiler will generate errors for where the variable could be used without being initialized.

This change is added to mitigate such errors and pave way to build ARM platforms on Windows system.

For each item, place an "x" in between [ and ] if true. Example: [x].
(you can also check items in the GitHub UI)

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

This was tested on QEMU SBSA platform and verified bootable to UEFI Shell.

Integration Instructions

N/A

@kuqin12 kuqin12 requested review from cfernald, os-d and apop5 May 13, 2024 23:11
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.12%. Comparing base (7361a30) to head (31c00ac).

❗ Current head 31c00ac differs from pull request most recent head bd9992d. Consider uploading reports for the commit bd9992d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #345   +/-   ##
=======================================
  Coverage   36.12%   36.12%           
=======================================
  Files          31       31           
  Lines        6229     6229           
  Branches      449      449           
=======================================
  Hits         2250     2250           
  Misses       3977     3977           
  Partials        2        2           
Flag Coverage Δ
Linux 27.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kuqin12 kuqin12 merged commit a1d5a5e into main May 14, 2024
13 checks passed
@kuqin12 kuqin12 deleted the fix_clang branch May 14, 2024 00:39
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.

4 participants