Skip to content

AT_CellularDevice.cpp - unused variable err warning #11598

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

Merged
merged 1 commit into from
Oct 1, 2019

Conversation

JanneKiiskila
Copy link
Contributor

@JanneKiiskila JanneKiiskila commented Sep 30, 2019

We get this compiler warning;

Compile [  7.9%]: AT_CellularDevice.cpp
[Warning] AT_CellularDevice.cpp@206,18: variable 'err' set but not used [-Wunused-but-set-variable]

Due to the fact, that the code that would actually use this variable
is behind trace flags. Moving the definition to be behind that same
flag resolves the issue.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@kivaisan @AnttiKauppila @0xc0170

Release Notes

Remove compiler warning due unused variable in AT_CellularDevice.cpp.

@ciarmcom ciarmcom requested review from 0xc0170, AnttiKauppila, kivaisan and a team September 30, 2019 13:00
@ciarmcom
Copy link
Member

@JanneKiiskila, thank you for your changes.
@AnttiKauppila @0xc0170 @kivaisan @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

We get this compiler warning;

Compile [  7.9%]: AT_CellularDevice.cpp
[Warning] AT_CellularDevice.cpp@206,18: variable 'err' set but not used [-Wunused-but-set-variable]

Due to the fact, that the code that would actually use this variable
is behind trace flags. Based on review feedback from Antti Kauppila and
Kimmo Väisänen, adding same flagging also for that.
- Reason being - the operation needs to be within the locks.
@JanneKiiskila
Copy link
Contributor Author

Understood, new fix pushed in (git commit --amend), commit message updated to explain the reasoning and give credit to you handsome fellas.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 1, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 1, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants