Module: kamailio Branch: master Commit: f2959f422bb8171241728f5148d4b21c9cc2c681 URL: https://github.com/kamailio/kamailio/commit/f2959f422bb8171241728f5148d4b21c9cc2c681
Author: Victor Seva <linuxman...@torreviejawireless.org> Committer: Victor Seva <linuxman...@torreviejawireless.org> Date: 2020-03-07T12:01:08+01:00 core: remove compiler warnings [-Wstring-plus-int] > core/parser/parse_fline.c:241:17: warning: adding 'int' to a string does not > append to the string [-Wstring-plus-int] > SIP_VERSION+1, SIP_VERSION_LEN-1)) { > ~~~~~~~~~~~^~ > > core/parser/parse_fline.c:241:17: note: use array indexing to silence this > warning > SIP_VERSION+1, SIP_VERSION_LEN-1)) { > ^ > & [ ] > core/parser/parse_fline.c:247:18: warning: adding 'int' to a string does not > append to the string [-Wstring-plus-int] > HTTP_VERSION+1, HTTP_VERSION_LEN-1)) { > ~~~~~~~~~~~~^~ > > core/parser/parse_fline.c:247:18: note: use array indexing to silence this > warning > HTTP_VERSION+1, HTTP_VERSION_LEN-1)) { > ^ > & [ ] > > 2 warnings generated. --- Modified: src/core/parser/parse_fline.c --- Diff: https://github.com/kamailio/kamailio/commit/f2959f422bb8171241728f5148d4b21c9cc2c681.diff Patch: https://github.com/kamailio/kamailio/commit/f2959f422bb8171241728f5148d4b21c9cc2c681.patch --- diff --git a/src/core/parser/parse_fline.c b/src/core/parser/parse_fline.c index a5aefb7ee8..5016a31d59 100644 --- a/src/core/parser/parse_fline.c +++ b/src/core/parser/parse_fline.c @@ -238,13 +238,13 @@ char* parse_first_line(char* buffer, unsigned int len, struct msg_start* fl) && (fl->u.request.version.s[0]=='S' || fl->u.request.version.s[0]=='s') && !strncasecmp(fl->u.request.version.s+1, - SIP_VERSION+1, SIP_VERSION_LEN-1)) { + &SIP_VERSION[1], SIP_VERSION_LEN-1)) { fl->flags|=FLINE_FLAG_PROTO_SIP; } else if(fl->u.request.version.len >= HTTP_VERSION_LEN && (fl->u.request.version.s[0]=='H' || fl->u.request.version.s[0]=='h') && !strncasecmp(fl->u.request.version.s+1, - HTTP_VERSION+1, HTTP_VERSION_LEN-1)) { + &HTTP_VERSION[1], HTTP_VERSION_LEN-1)) { fl->flags|=FLINE_FLAG_PROTO_HTTP; } } _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev