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:
@@ -333,7 +333,7 @@ static int printdigest(const unsigned char *d)
|
||||
char buf[256]; /* large enough so we don't have to worry */
|
||||
|
||||
for (pos = 0, x = 0; x < 16; x++)
|
||||
pos += sprintf(buf + pos, " %02x", *d++);
|
||||
pos += sprintf(buf + pos, " %02x", (unsigned)*d++);
|
||||
|
||||
ast_debug(1, "Unexpected signature:%s\n", buf);
|
||||
|
||||
@@ -802,7 +802,7 @@ static void publish_reload_message(const char *name, enum ast_module_reload_resu
|
||||
RAII_VAR(struct ast_json *, event_object, NULL, ast_json_unref);
|
||||
char res_buffer[8];
|
||||
|
||||
snprintf(res_buffer, sizeof(res_buffer), "%d", result);
|
||||
snprintf(res_buffer, sizeof(res_buffer), "%u", result);
|
||||
event_object = ast_json_pack("{s: s, s: s}",
|
||||
"Module", S_OR(name, "All"),
|
||||
"Status", res_buffer);
|
||||
@@ -1320,7 +1320,7 @@ int load_modules(unsigned int preload_only)
|
||||
load_count++;
|
||||
|
||||
if (load_count)
|
||||
ast_log(LOG_NOTICE, "%d modules will be loaded.\n", load_count);
|
||||
ast_log(LOG_NOTICE, "%u modules will be loaded.\n", load_count);
|
||||
|
||||
/* first, load only modules that provide global symbols */
|
||||
if ((res = load_resource_list(&load_order, 1, &modulecount)) < 0) {
|
||||
|
Reference in New Issue
Block a user