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

Add the default in switch implementation to prevent gcc build error #263

Merged

Conversation

MarcChen46
Copy link
Contributor

@MarcChen46 MarcChen46 commented Oct 13, 2023

Description

When the KnobService.py generate the ConfigDataGenerated.h, it generated the ValidateEnumValueXXXX function that has a switch implementation, but it missed the default: in the switch implementation that cause gcc build failed with [-Werror=switch] error.

  • 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

Verified the build that include ConfigDataGenerated.h by gcc compile

Integration Instructions

N/A

@github-actions github-actions bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Oct 13, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #263 (2bf0703) into main (04e6f18) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head 2bf0703 differs from pull request most recent head c79fdeb. Consider uploading reports for the commit c79fdeb to get more accurate results

@@            Coverage Diff             @@
##             main     #263      +/-   ##
==========================================
- Coverage   27.40%   27.39%   -0.02%     
==========================================
  Files          16       16              
  Lines        4550     4552       +2     
==========================================
  Hits         1247     1247              
- Misses       3303     3305       +2     
Flag Coverage Δ
Linux 27.39% <0.00%> (-0.02%) ⬇️

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

Files Coverage Δ
SetupDataPkg/Tools/KnobService.py 0.00% <0.00%> (ø)

@MarcChen46
Copy link
Contributor Author

@apop5 @kuqin12, please help reviewing it, thanks.

@kuqin12 kuqin12 added the type:bug Something isn't working label Oct 13, 2023
@kuqin12 kuqin12 merged commit d402477 into microsoft:main Oct 13, 2023
17 checks passed
ProjectMuBot referenced this pull request in microsoft/mu_tiano_platforms Oct 21, 2023
Introduces 6 new commits in [Features/CONFIG](https://github.com/microsoft/mu_feature_config.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/392d2133f236e4c226e57b26692b0d4d558cdff7">392d21</a> pip: bump edk2-pytool-library from 0.18.2 to 0.19.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/261">#261</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/1f6d765aadf55eb6ee4cff3b2e7508fd77a397ba">1f6d76</a> pip: bump edk2-pytool-extensions from 0.24.1 to 0.25.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/262">#262</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/04e6f1824344cc4667caf9c7a9f02305eec879f9">04e6f1</a> Repo File Sync: Update to Mu DevOps v7.0.0 (<a href="https://github.com/microsoft/mu_feature_config/pull/260">#260</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/d4024776261b4d288094c246ec7916ac8287d04f">d40247</a> Add the default in switch implementation to prevent gcc build error (<a href="https://github.com/microsoft/mu_feature_config/pull/263">#263</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/c91a9f32bd51b5cb19ccaf0c175f9ab44e1cb781">c91a9f</a> Repo File Sync: Update to Mu DevOps 7.0.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/264">#264</a>)</li>
<li><a href="https://github.com/microsoft/mu_feature_config/commit/decdc3afb084a2389a2bc0122a64addcd3eee8dc">decdc3</a> pip: bump edk2-pytool-library from 0.19.0 to 0.19.1 (<a href="https://github.com/microsoft/mu_feature_config/pull/265">#265</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact language:python Pull requests that update Python code type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants