mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
BuildSystem: Fix a few issues hightlighted by gcc 6.x
gcc 6.1.1 caught a few more issues. Made sure the unit tests still pass for the func_env and stdtime issues. ASTERISK-26157 #close Change-Id: I6664d8f34a45bc1481d2a854481c7878b0c1cf8e
This commit is contained in:
16
main/say.c
16
main/say.c
@@ -5774,13 +5774,14 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t t, const char *
|
||||
case 'I':
|
||||
case 'l':
|
||||
/* 12-Hour */
|
||||
if (tm.tm_hour == 0)
|
||||
if (tm.tm_hour == 0) {
|
||||
ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg));
|
||||
else if (tm.tm_hour > 12)
|
||||
} else if (tm.tm_hour > 12) {
|
||||
snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour - 12);
|
||||
else
|
||||
} else {
|
||||
snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour);
|
||||
res = wait_file(chan, ints, nextmsg, lang);
|
||||
}
|
||||
res = wait_file(chan, ints, nextmsg, lang);
|
||||
break;
|
||||
case 'H':
|
||||
case 'k':
|
||||
@@ -5800,11 +5801,12 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t t, const char *
|
||||
case 'P':
|
||||
case 'p':
|
||||
/* AM/PM */
|
||||
if (tm.tm_hour > 11)
|
||||
if (tm.tm_hour > 11) {
|
||||
ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg));
|
||||
else
|
||||
} else {
|
||||
ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg));
|
||||
res = wait_file(chan, ints, nextmsg, lang);
|
||||
}
|
||||
res = wait_file(chan, ints, nextmsg, lang);
|
||||
break;
|
||||
case 'Q':
|
||||
/* Shorthand for "Today", "Yesterday", or ABdY */
|
||||
|
Reference in New Issue
Block a user