Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(esp32): Compiler warning - loop variablea shadows previous instance ofa in functioni2c_slave_gpio_mode#11828

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@martinbudden
Copy link
Contributor

In functioni2c_slave_gpio_mode an inner loop variablea shadows an outer loop variablea.

This causes the warning:
warning: declaration of 'a' shadows a previous local [-Wshadow]
when compiled with option-Wshadow.

Description of Change

Renamed variablea in inner loop tob.

Test Scenarios

Code compiles without warning when change made.

Related links

None

@martinbuddenmartinbudden requested a review froma team as acode ownerSeptember 13, 2025 15:04
@CLAassistant
Copy link

CLAassistant commentedSep 13, 2025
edited
Loading

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

github-actionsbot commentedSep 13, 2025
edited
Loading

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message"Fix shadow warning - loop variable a shadows previous instance of a.":
    • summary should not end with a period (full stop)
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • followConventional Commits style
  • correct format of commit message should be:<type/action>(<scope/component>): <summary>, for examplefix(esp32): Fixed startup timeout issue
  • allowed types are:change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses theConventional Precommit Linter).

👋Hello martinbudden, we appreciate your contribution to this project!


📘 Please review the project'sContributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you haveread and signed theContributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by thePR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with eachpush event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger isnot a substitute for human code reviews; it's still important to request a code review from your colleagues.
-Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manuallyretry these Danger checks, please navigate to theActions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫dangerJS against02469d4

@martinbuddenmartinbudden changed the titleFix shadow warning - loop variable a shadows previous instance of a in functioni2c_slave_gpio_modefix(esp32): Compiler warning - loop variable a shadows previous instance of a in functioni2c_slave_gpio_modeSep 13, 2025
@martinbuddenmartinbudden changed the titlefix(esp32): Compiler warning - loop variable a shadows previous instance of a in functioni2c_slave_gpio_modefix(esp32): Compiler warning - loop variablea shadows previous instance ofa in functioni2c_slave_gpio_modeSep 13, 2025
@github-actions
Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32C5000.000.00000.000.00
ESP32P4000.000.00000.000.00
ESP32S3000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP32H2000.000.00000.000.00
ESP32000.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32P4ESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/ESP32/examples/CI/CIBoardsTest0000000000000000
libraries/ESP_I2S/examples/ES8388_loopback0000000000000000
libraries/HTTPClient/examples/HTTPClientEnterprise00--00000000--00
libraries/NetworkClientSecure/examples/WiFiClientSecureEnterprise00--00000000--00
libraries/Wire/examples/WireMaster0000000000000000
libraries/Wire/examples/WireScan0000000000000000
libraries/Wire/examples/WireSlave0000000000000000
libraries/Wire/examples/WireSlaveFunctionalCallback0000000000000000

@github-actions
Copy link
Contributor

github-actionsbot commentedSep 13, 2025
edited
Loading

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit02469d4.

♻️ This comment has been updated with latest results.

@lucasssvazlucasssvaz added Area: LibrariesIssue is related to Library support. Area: Peripherals APIRelates to peripheral's APIs. and removed Area: LibrariesIssue is related to Library support. labelsSep 13, 2025
@P-R-O-C-H-YP-R-O-C-H-Y added the Status: Review neededIssue or PR is awaiting review labelSep 15, 2025
@me-no-devme-no-dev added Status: Pending MergePull Request is ready to be merged and removed Status: Review neededIssue or PR is awaiting review labelsSep 16, 2025
@me-no-devme-no-dev merged commit2211461 intoespressif:masterSep 16, 2025
89 of 95 checks passed
@martinbuddenmartinbudden deleted the fix_shadow_warning_loop branchSeptember 18, 2025 17:32
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@me-no-devme-no-devme-no-dev approved these changes

@lucasssvazlucasssvazlucasssvaz approved these changes

@P-R-O-C-H-YP-R-O-C-H-YP-R-O-C-H-Y approved these changes

Assignees

No one assigned

Labels

Area: Peripherals APIRelates to peripheral's APIs.Status: Pending MergePull Request is ready to be merged

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@martinbudden@CLAassistant@me-no-dev@lucasssvaz@P-R-O-C-H-Y

[8]ページ先頭

©2009-2025 Movatter.jp