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

Cellular: Fix AT Handler compile warning #6765

Merged
merged 2 commits into from May 3, 2018

Conversation

Projects
None yet
6 participants
@mirelachirica
Contributor

mirelachirica commented Apr 27, 2018

Description

Fix AT Handler compile warning in read routine + returned length. Unit tests are also passing after these changes.

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change
@mirelachirica

This comment has been minimized.

Contributor

mirelachirica commented Apr 27, 2018

@jarvte please review this

@jarvte

jarvte approved these changes Apr 27, 2018

@0xc0170 0xc0170 added the needs: CI label Apr 27, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Apr 27, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Apr 27, 2018

Build : SUCCESS

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

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.

@@ -515,15 +515,15 @@ ssize_t ATHandler::read(char *buf, size_t size, bool read_even_stop_tag, bool he
pbuf[buf_idx] = c;
} else {
if (read_idx % 2 == 0) {
upper = hex_str_to_int(&c, 1);
upper = hex_str_to_int((const char*)&c, 1);

This comment has been minimized.

@kjbracey-arm

kjbracey-arm Apr 30, 2018

Contributor

That cast is not legal - you're going to need to actually have a char to pass this function.

Suggest the simplest way might not be to remember upper but to remember the previous character.

 char hexbuf[2];

 hexbuf[read_idx % 2] = c;
 if (read_idx % 2 == 1) {
    hex_str_to_char_str(hexbuf, 2, pbuf+buf_idx);
 }
@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 30, 2018

@kjbracey-arm could you re-review please

@adbridge adbridge added needs: review and removed needs: CI labels Apr 30, 2018

@kjbracey-arm

Looks a lot better.

@adbridge

This comment has been minimized.

Contributor

adbridge commented Apr 30, 2018

/morph build

@mirelachirica

This comment has been minimized.

Contributor

mirelachirica commented Apr 30, 2018

This is linked to/fixes #6691 which has label release-version: 5.9.0-rc1.

@mbed-ci

This comment has been minimized.

mbed-ci commented Apr 30, 2018

Build : SUCCESS

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

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.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels May 2, 2018

@mirelachirica

This comment has been minimized.

Contributor

mirelachirica commented May 3, 2018

@0xc0170 will you merge this? thanks.

@0xc0170 0xc0170 merged commit 16ab718 into ARMmbed:master May 3, 2018

12 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
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 8899 cycles (-1279 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/littlefs Passed, code size is 10112B (+0.00%)
Details
travis-ci/tools Local tools testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label May 3, 2018

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