Fix a bunch of compiler warnings generated by gcc 4.6.0.

Most of these are -Wunused-but-set-variable, but there were a few others
mixed in here, as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@316265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2011-05-03 19:55:49 +00:00
parent c5ad2f12a0
commit a82f1bb995
34 changed files with 70 additions and 176 deletions

View File

@@ -6560,7 +6560,6 @@ static int manager_show_dialplan(struct mansession *s, const struct message *m)
const char *exten, *context;
const char *id = astman_get_header(m, "ActionID");
char idtext[256];
int res;
/* Variables used for different counters */
struct dialplan_counters counters;
@@ -6575,7 +6574,7 @@ static int manager_show_dialplan(struct mansession *s, const struct message *m)
exten = astman_get_header(m, "Extension");
context = astman_get_header(m, "Context");
res = manager_show_dialplan_helper(s, m, idtext, context, exten, &counters, NULL);
manager_show_dialplan_helper(s, m, idtext, context, exten, &counters, NULL);
if (context && !counters.context_existence) {
char errorbuf[BUFSIZ];
@@ -7409,7 +7408,7 @@ static const char * const months[] =
int ast_build_timing(struct ast_timing *i, const char *info_in)
{
char *info_save, *info;
char *info;
int j, num_fields, last_sep = -1;
/* Check for empty just in case */
@@ -7418,7 +7417,7 @@ int ast_build_timing(struct ast_timing *i, const char *info_in)
}
/* make a copy just in case we were passed a static string */
info_save = info = ast_strdupa(info_in);
info = ast_strdupa(info_in);
/* count the number of fields in the timespec */
for (j = 0, num_fields = 1; info[j] != '\0'; j++) {