mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which cause the build to fail under dev mode. The vast majority are signed/unsigned mismatches in printf-style format strings. ........ Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -246,7 +246,7 @@ static void make_components(struct logchannel *chan)
|
||||
unsigned int logmask = 0;
|
||||
char *stringp = ast_strdupa(chan->components);
|
||||
unsigned int x;
|
||||
int verb_level;
|
||||
unsigned int verb_level;
|
||||
|
||||
/* Default to using option_verbose as the verbosity level of the logging channel. */
|
||||
verb_level = -1;
|
||||
@@ -1037,7 +1037,7 @@ static void ast_log_vsyslog(struct logmsg *msg)
|
||||
char call_identifier_str[13];
|
||||
|
||||
if (msg->callid) {
|
||||
snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", msg->callid->call_identifier);
|
||||
snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", (unsigned)msg->callid->call_identifier);
|
||||
} else {
|
||||
call_identifier_str[0] = '\0';
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ static void logger_print_normal(struct logmsg *logmsg)
|
||||
char call_identifier_str[13];
|
||||
|
||||
if (logmsg->callid) {
|
||||
snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", logmsg->callid->call_identifier);
|
||||
snprintf(call_identifier_str, sizeof(call_identifier_str), "[C-%08x]", (unsigned)logmsg->callid->call_identifier);
|
||||
} else {
|
||||
call_identifier_str[0] = '\0';
|
||||
}
|
||||
@@ -1322,7 +1322,7 @@ void close_logger(void)
|
||||
|
||||
void ast_callid_strnprint(char *buffer, size_t buffer_size, struct ast_callid *callid)
|
||||
{
|
||||
snprintf(buffer, buffer_size, "[C-%08x]", callid->call_identifier);
|
||||
snprintf(buffer, buffer_size, "[C-%08x]", (unsigned)callid->call_identifier);
|
||||
}
|
||||
|
||||
struct ast_callid *ast_create_callid(void)
|
||||
@@ -1960,7 +1960,7 @@ int ast_logger_register_level(const char *name)
|
||||
|
||||
AST_RWLIST_UNLOCK(&logchannels);
|
||||
|
||||
ast_debug(1, "Registered dynamic logger level '%s' with index %d.\n", name, available);
|
||||
ast_debug(1, "Registered dynamic logger level '%s' with index %u.\n", name, available);
|
||||
|
||||
update_logchannels();
|
||||
|
||||
@@ -1998,7 +1998,7 @@ void ast_logger_unregister_level(const char *name)
|
||||
levels[x] = NULL;
|
||||
AST_RWLIST_UNLOCK(&logchannels);
|
||||
|
||||
ast_debug(1, "Unregistered dynamic logger level '%s' with index %d.\n", name, x);
|
||||
ast_debug(1, "Unregistered dynamic logger level '%s' with index %u.\n", name, x);
|
||||
|
||||
update_logchannels();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user