diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bd694ec..4c25ec2 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9595,7 +9595,8 @@ static int parse_request(struct sip_request *req) { char *c = ast_str_buffer(req->data); ptrdiff_t *dst = req->header; - int i = 0, lim = SIP_MAX_HEADERS - 1; + int i = 0; + unsigned int lim = SIP_MAX_HEADERS - 1; unsigned int skipping_headers = 0; ptrdiff_t current_header_offset = 0; char *previous_header = ""; diff --git a/include/asterisk/inline_api.h b/include/asterisk/inline_api.h index d76dfa0..291a838 100644 --- a/include/asterisk/inline_api.h +++ b/include/asterisk/inline_api.h @@ -48,7 +48,7 @@ #if !defined(LOW_MEMORY) && !defined(DISABLE_INLINE) #if !defined(AST_API_MODULE) -#if defined(__clang__) +#if defined(__clang__) || defined(__GNUC_STDC_INLINE__) #define AST_INLINE_API(hdr, body) static hdr; static inline hdr body #else /* if defined(__clang__) */ #define AST_INLINE_API(hdr, body) hdr; extern inline hdr body diff --git a/main/ccss.c b/main/ccss.c index 7f63690..ff5739a 100644 --- a/main/ccss.c +++ b/main/ccss.c @@ -825,7 +825,7 @@ int ast_cc_set_param(struct ast_cc_config_params *params, const char * const nam return 0; } - if (!sscanf(value, "%30u", &value_as_uint) == 1) { + if (sscanf(value, "%30u", &value_as_uint) != 1) { return -1; } diff --git a/main/dsp.c b/main/dsp.c index a329dbb..180b22f 100644 --- a/main/dsp.c +++ b/main/dsp.c @@ -1045,8 +1045,10 @@ static int __ast_dsp_call_progress(struct ast_dsp *dsp, short *s, int len) for (x = 0; x < pass; x++) { samp = s[x]; dsp->genergy += (int32_t) samp * (int32_t) samp; - for (y = 0; y < dsp->freqcount; y++) { - goertzel_sample(&dsp->freqs[y], samp); + for (y = 0; y < 7; y++) { + if (&dsp->freqs[y] != NULL) { + goertzel_sample(&dsp->freqs[y], samp); + } } } s += pass; diff --git a/main/manager.c b/main/manager.c index 8fa1942..be780e7 100644 --- a/main/manager.c +++ b/main/manager.c @@ -4785,7 +4785,7 @@ static int action_atxfer(struct mansession *s, const struct message *m) static int check_blacklist(const char *cmd) { char *cmd_copy, *cur_cmd; - char *cmd_words[MAX_BLACKLIST_CMD_LEN] = { NULL, }; + char *cmd_words[AST_MAX_CMD_LEN] = { NULL, }; int i; cmd_copy = ast_strdupa(cmd);