[Asterisk-code-review] test_voicemail_api.c: changing empty_msg_ids from 0 element array to ... (asterisk[master])
Michael Bradeen
asteriskteam at digium.com
Thu Oct 7 13:08:22 CDT 2021
Michael Bradeen has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16571 )
Change subject: test_voicemail_api.c: changing empty_msg_ids from 0 element array to empty char* chan_skinny.c: changed calledParty size to AST_MAX_EXTENSION menuselect Makefile: added -Wno-deprecated-declarations
......................................................................
test_voicemail_api.c: changing empty_msg_ids from 0 element array to empty char*
chan_skinny.c: changed calledParty size to AST_MAX_EXTENSION
menuselect Makefile: added -Wno-deprecated-declarations
Changes made to avoid gcc compilation errors.
SWP-11547
Reported by: George Joseph
Change-Id: If4fe42222c8444dc16828a42731ee53b4ce5cbbe
---
M channels/chan_skinny.c
M menuselect/Makefile
M tests/test_voicemail_api.c
3 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/71/16571/1
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 05ec46f..2966ea2 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -314,7 +314,7 @@
#define ENBLOC_CALL_MESSAGE 0x0004
struct enbloc_call_message {
- char calledParty[24];
+ char calledParty[AST_MAX_EXTENSION];
};
#define STIMULUS_MESSAGE 0x0005
diff --git a/menuselect/Makefile b/menuselect/Makefile
index c310c18..14aeb3e 100644
--- a/menuselect/Makefile
+++ b/menuselect/Makefile
@@ -22,7 +22,7 @@
# Basic set of sources and flags/libraries/includes
OBJS:=menuselect.o strcompat.o
-CFLAGS+=-g -D_GNU_SOURCE -Wall
+CFLAGS+=-g -D_GNU_SOURCE -Wall -Wno-deprecated-declarations
ifneq ($(findstring dragonfly,$(OSARCH)),)
CFLAGS += -isystem /usr/local/include
diff --git a/tests/test_voicemail_api.c b/tests/test_voicemail_api.c
index e467572..2338e38 100644
--- a/tests/test_voicemail_api.c
+++ b/tests/test_voicemail_api.c
@@ -1156,7 +1156,7 @@
{
const char *inbox_msg_id;
const char *multi_msg_ids[2];
- const char *empty_msg_ids[] = { };
+ const char *empty_msg_ids = "";
switch (cmd) {
case TEST_INIT:
@@ -1207,7 +1207,7 @@
VM_API_REMOVE_MESSAGE_OFF_NOMINAL("test_vm_api_2345", "default", 2, "INBOX", multi_msg_ids);
ast_test_status_update(test, "Test removing no messages with no message numbers\n");
- VM_API_REMOVE_MESSAGE_OFF_NOMINAL("test_vm_api_1234", "default", 0, "INBOX", empty_msg_ids);
+ VM_API_REMOVE_MESSAGE_OFF_NOMINAL("test_vm_api_1234", "default", 0, "INBOX", &empty_msg_ids);
ast_test_status_update(test, "Test removing multiple messages with an invalid size specifier\n");
VM_API_REMOVE_MESSAGE_OFF_NOMINAL("test_vm_api_2345", "default", -30, "INBOX", multi_msg_ids);
@@ -1330,7 +1330,7 @@
const char *inbox_msg_id;
const char *multi_msg_ids[4];
- const char *empty_msg_ids[] = { };
+ const char *empty_msg_ids = "";
switch (cmd) {
case TEST_INIT:
@@ -1393,7 +1393,7 @@
VM_API_FORWARD_MESSAGE_OFF_NOMINAL("test_vm_api_1234", "default", "INBOX", "test_vm_api_2345", "default", NULL, 1, &inbox_msg_id, 0);
ast_test_status_update(test, "Test forwarding when no messages are select\n");
- VM_API_FORWARD_MESSAGE_OFF_NOMINAL("test_vm_api_1234", "default", "INBOX", "test_vm_api_2345", "default", "INBOX", 0, empty_msg_ids, 0);
+ VM_API_FORWARD_MESSAGE_OFF_NOMINAL("test_vm_api_1234", "default", "INBOX", "test_vm_api_2345", "default", "INBOX", 0, &empty_msg_ids, 0);
ast_test_status_update(test, "Test forwarding a message that doesn't exist\n");
inbox_msg_id = "POOPOO";
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16571
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: If4fe42222c8444dc16828a42731ee53b4ce5cbbe
Gerrit-Change-Number: 16571
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211007/82888363/attachment.html>
More information about the asterisk-code-review
mailing list