-
Notifications
You must be signed in to change notification settings - Fork 3k
Cellular: Fix AT Handler compile warning #6765
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
Conversation
@jarvte please review this |
/morph build |
Build : SUCCESSBuild number : 1873 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1521 |
Test : SUCCESSBuild number : 1687 |
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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);
}
@kjbracey-arm could you re-review please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks a lot better.
/morph build |
This is linked to/fixes #6691 which has label release-version: 5.9.0-rc1. |
Build : SUCCESSBuild number : 1880 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1529 |
Test : SUCCESSBuild number : 1694 |
@0xc0170 will you merge this? thanks. |
Description
Fix AT Handler compile warning in read routine + returned length. Unit tests are also passing after these changes.
Pull request type