diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c index 99c9619c1e..6ceb2d610f 100644 --- a/apps/app_externalivr.c +++ b/apps/app_externalivr.c @@ -309,12 +309,11 @@ static void ast_eivr_getvariable(struct ast_channel *chan, char *data, char *out char *inbuf, *variable; const char *value; - int j; struct ast_str *newstring = ast_str_alloca(outbuflen); outbuf[0] = '\0'; - for (j = 1, inbuf = data; ; j++) { + for (inbuf = data; ; ) { variable = strsep(&inbuf, ","); if (variable == NULL) { int outstrlen = strlen(outbuf); diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 1dc041f0df..4b1d9e6a53 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -2604,14 +2604,14 @@ static int timezone_add(const char *zonename, const char *config) } /*! \brief Read message template from file */ -static char *message_template_parse_filebody(const char *filename) { +static char *message_template_parse_filebody(const char *filename) +{ char buf[BUFSIZ * 6]; char readbuf[BUFSIZ]; char filenamebuf[BUFSIZ]; char *writepos; char *messagebody; FILE *fi; - int lines = 0; if (ast_strlen_zero(filename)) return NULL; @@ -2626,7 +2626,6 @@ static char *message_template_parse_filebody(const char *filename) { } writepos = buf; while (fgets(readbuf, sizeof(readbuf), fi)) { - lines ++; if (writepos != buf) { *writepos = '\n'; /* Replace EOL with new line */ writepos++; diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index ade24a597f..425d939be1 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -5100,7 +5100,6 @@ static int unistimsock_read(int *id, int fd, short events, void *ignore) struct sockaddr_in addr_from = { 0, }; struct unistimsession *cur = NULL; int found = 0; - int tmp = 0; int dw_num_bytes_rcvd; unsigned int size_addr_from; #ifdef DUMP_PACKET @@ -5128,7 +5127,6 @@ static int unistimsock_read(int *id, int fd, short events, void *ignore) found = 1; break; } - tmp++; cur = cur->next; } ast_mutex_unlock(&sessionlock); diff --git a/funcs/func_curl.c b/funcs/func_curl.c index b4b98206c4..9bddb41fdc 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -619,8 +619,8 @@ static int curl_instance_init(void *data) if (!(*curl = curl_easy_init())) return -1; - curl_easy_setopt(*curl, CURLOPT_NOSIGNAL, 1); - curl_easy_setopt(*curl, CURLOPT_TIMEOUT, 180); + curl_easy_setopt(*curl, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(*curl, CURLOPT_TIMEOUT, 180L); curl_easy_setopt(*curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(*curl, CURLOPT_USERAGENT, AST_CURL_USER_AGENT); diff --git a/main/Makefile b/main/Makefile index e6aa7acece..3100fdd591 100644 --- a/main/Makefile +++ b/main/Makefile @@ -148,6 +148,7 @@ endif stdtime/localtime.o: _ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW) -Wno-format-nonliteral asterisk.o: _ASTCFLAGS+=$(LIBEDIT_INCLUDE) +ast_expr2.o: _ASTCFLAGS+=-Wno-unused ast_expr2f.o: _ASTCFLAGS+=-Wno-unused astmm.o: _ASTCFLAGS+=$(call get_menuselect_cflags,MALLOC_DEBUG DEBUG_CHAOS) astobj2.o astobj2_container.o astobj2_hash.o astobj2_rbtree.o: _ASTCFLAGS+=$(call get_menuselect_cflags,AO2_DEBUG) diff --git a/main/fskmodem_float.c b/main/fskmodem_float.c index d0f54c086a..dd8d24b7fc 100644 --- a/main/fskmodem_float.c +++ b/main/fskmodem_float.c @@ -225,7 +225,6 @@ int fsk_serial(fsk_data *fskd, short *buffer, int *len, int *outbyte) { int a; int i,j,n1,r; - int samples = 0; int olen; switch (fskd->state) { @@ -257,14 +256,12 @@ int fsk_serial(fsk_data *fskd, short *buffer, int *len, int *outbyte) a start bit, perhaps. This whole thing stinks! */ if (demodulator(fskd, &fskd->x1, GET_SAMPLE)) return -1; - samples++; for (;;) { search_startbit2: if (*len <= 0) { fskd->state = STATE_SEARCH_STARTBIT2; return 0; } - samples++; if (demodulator(fskd, &fskd->x2, GET_SAMPLE)) return(-1); #if 0 @@ -286,7 +283,6 @@ search_startbit3: #if 0 printf("x1 = %5.5f ", fskd->x1); #endif - samples++; } /* x1 must be negative (start bit confirmation) */ diff --git a/main/say.c b/main/say.c index b230b0d708..b2435c0d14 100644 --- a/main/say.c +++ b/main/say.c @@ -8202,8 +8202,6 @@ static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char { int res = 0; char fn[256] = ""; - int i=0; - if (!num) { ast_copy_string(fn, "digits/0", sizeof(fn)); @@ -8213,7 +8211,6 @@ static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char } while (!res && num ) { - i++; if (num < 13) { snprintf(fn, sizeof(fn), "digits/%d", num); num = 0; diff --git a/main/utils.c b/main/utils.c index 6bc2d4cd93..f4b122932c 100644 --- a/main/utils.c +++ b/main/utils.c @@ -298,14 +298,12 @@ int ast_base64decode(unsigned char *dst, const char *src, int max) int cnt = 0; unsigned int byte = 0; unsigned int bits = 0; - int incnt = 0; while(*src && *src != '=' && (cnt < max)) { /* Shift in 6 bits of input */ byte <<= 6; byte |= (b2a[(int)(*src)]) & 0x3f; bits += 6; src++; - incnt++; /* If we have at least 8 bits left over, take that character off the top */ if (bits >= 8) { diff --git a/res/Makefile b/res/Makefile index 96c95a69cc..994554e81c 100644 --- a/res/Makefile +++ b/res/Makefile @@ -32,7 +32,7 @@ ael/ael_lex.o: ael/ael_lex.c ../include/asterisk/ael_structs.h ael/ael.tab.h ael/ael_lex.o: _ASTCFLAGS+=-I. -Iael -Wno-unused $(AST_NO_FORMAT_TRUNCATION) ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h -ael/ael.tab.o: _ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0 +ael/ael.tab.o: _ASTCFLAGS+=-I. -Iael -Wno-unused -DYYENABLE_NLS=0 ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),) ael/ael_lex.c: ael/ael.flex @@ -54,6 +54,7 @@ endif $(CMD_PREFIX) (cd ael; $(BISON) -v -d ael.y) ael/pval.o: ael/pval.c +ael/pval.o: _ASTCFLAGS+=-Wno-unused $(call MOD_ADD_C,res_ael_share,ael/ael_lex.c ael/ael.tab.c ael/pval.c) $(call MOD_ADD_C,res_stasis,$(wildcard stasis/*.c))