[Asterisk-code-review] tests: Fix warnings found on Mac. (asterisk[13])
Corey Farrell
asteriskteam at digium.com
Sat Nov 18 21:16:04 CST 2017
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7290
Change subject: tests: Fix warnings found on Mac.
......................................................................
tests: Fix warnings found on Mac.
test_pbx used raise without explicitly including signal.h. On Mac for
some reason nothing else includes it.
test_logger checked if an unsigned int was negative. Switch the
variable to 'int' so that error check can be effective.
Change-Id: Ie1db5dd1818ac25cc2ae41b644f848b5865b1362
---
M tests/test_logger.c
M tests/test_pbx.c
2 files changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/90/7290/1
diff --git a/tests/test_logger.c b/tests/test_logger.c
index bf809ba..08585a6 100644
--- a/tests/test_logger.c
+++ b/tests/test_logger.c
@@ -192,7 +192,7 @@
static char *handle_cli_queue_test(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
- unsigned int level;
+ int level;
int current_queue_limit;
unsigned int x;
struct timeval start, end;
@@ -222,7 +222,7 @@
ast_cli(a->fd, "Test: Failed, could not register level 'queuetest'.\n");
return CLI_SUCCESS;
}
- ast_cli(a->fd, "Test: got level %u for 'queuetest'.\n", level);
+ ast_cli(a->fd, "Test: got level %d for 'queuetest'.\n", level);
if (ast_logger_create_channel(tmppath, "queuetest") != AST_LOGGER_SUCCESS) {
ast_cli(a->fd, "Test: Unable to create logger channel '%s'\n", tmppath);
diff --git a/tests/test_pbx.c b/tests/test_pbx.c
index acf7484..df6b88d 100644
--- a/tests/test_pbx.c
+++ b/tests/test_pbx.c
@@ -39,6 +39,8 @@
#include "asterisk/pbx.h"
#include "asterisk/test.h"
+#include <signal.h>
+
/*!
* If we determine that we really need
* to be able to register more than 10
--
To view, visit https://gerrit.asterisk.org/7290
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1db5dd1818ac25cc2ae41b644f848b5865b1362
Gerrit-Change-Number: 7290
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171118/bb148ff9/attachment.html>
More information about the asterisk-code-review
mailing list