Skip to content

Commit

Permalink
Eliminate compiler warnings due to commit b2f7d2a
Browse files Browse the repository at this point in the history
(pulled in by SIPp#481)

- missing parentheses within if condition
- comparison between signed and unsigned integer values
- dereferencing an uninitialized pointer
- variable-length array being unsupported by the C++ standard
  • Loading branch information
uhle committed Jan 17, 2021
1 parent f1e9f3a commit 3ca1221
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 102 deletions.
2 changes: 1 addition & 1 deletion src/call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ bool call::checkAckCSeq(const char* msg)
(msg[5] == '.') &&
(msg[6] == '0')) {
request[0]=0;
} else if (ptr = strchr(msg, ' ')) {
} else if ((ptr = strchr(msg, ' '))) {
if ((ptr - msg) < 64) {
memcpy(request, msg, ptr - msg);
request[ptr - msg] = 0;
Expand Down
Loading

0 comments on commit 3ca1221

Please sign in to comment.