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

Compiler warning: unused variable in LoRaMac.h #7807

Merged
merged 1 commit into from Aug 21, 2018

Conversation

Projects
None yet
6 participants
@hasnainvirk
Contributor

hasnainvirk commented Aug 16, 2018

Description

Fixing an unused variable warning

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Feature
[ ] Breaking change
@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Aug 16, 2018

@0xc0170 Please review. Minor compiler warning fix.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 16, 2018

@hasnainvirk Please update the PR title and commit to be something a bit more specific than "a minor warning"

@cmonr cmonr self-requested a review Aug 16, 2018

@cmonr cmonr added the needs: work label Aug 16, 2018

@hasnainvirk hasnainvirk changed the title from Fixing a minor warning to Compiler warning: unused variable in LoRaMac.h Aug 17, 2018

unused variable warning in LoRaMac.h for release build
In release builds where MBED_ASSERT macro is syphoned off, we were hitting
an unused variable warning. To mitigate that we could direct the variable
used in MBED_ASSERT to void.

@hasnainvirk hasnainvirk force-pushed the hasnainvirk:warning_fix branch from b77307a to a7cb32f Aug 17, 2018

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Aug 17, 2018

@cmonr How does it look now ? Sorry for the lame message in the first attempt. Was in hurry to leave for home :D

@mattbrown015

This comment has been minimized.

Contributor

mattbrown015 commented Aug 17, 2018

It looks to me like Mutex lock has possibility to fail at runtime (returning status flag) #6872 means a better solution would be to remove the status check.

I haven't considered the discussion is great detail but some people think that Mutex::lock shouldn't return a value and the only reason it does is to maintain backward compatibility.

@cmonr

cmonr approved these changes Aug 17, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 17, 2018

@mattbrown015 This PR is only correcting a unused variable warning. It looks like the discussion in regards to issue #6872 is continuing in this PR: #7423

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Aug 17, 2018

Build : SUCCESS

Build number : 2831
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7807/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Aug 20, 2018

@cmonr Actually @mattbrown015 is right. osStatus Mutex::lock will soon get deprecated in favour of void Mutex::lock. I am not sure if this PR is worth it. I pushed this PR thinking that the #7423 will take time. Anyway your call to keep the PR or discard it.

@hasnainvirk

This comment has been minimized.

Contributor

hasnainvirk commented Aug 20, 2018

@cmonr Do we need to restart the CI ?

@0xc0170 0xc0170 added needs: review and removed needs: CI labels Aug 20, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 20, 2018

/morph test

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Aug 20, 2018

@mbed-ci

This comment has been minimized.

@NirSonnenschein

This comment has been minimized.

Contributor

NirSonnenschein commented Aug 21, 2018

/morph uvisor-test

@cmonr cmonr merged commit bf26cbf into ARMmbed:master Aug 21, 2018

15 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0.0%) RAM(+0.0%)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud_client_smoke_test Test job was successful
Details
travis-ci/astyle Passed, 584 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 8969 cycles (-934 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

Merge pull request ARMmbed#7807 from hasnainvirk/warning_fix
Compiler warning: unused variable in LoRaMac.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment