[Asterisk-code-review] tests: Fix warnings found on Mac. (asterisk[certified/13.18])
Jenkins2
asteriskteam at digium.com
Fri Dec 1 07:16:53 CST 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7394 )
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
(cherry picked from commit 5fe2e7bfdcd06935594823faba67c71ead7ebcf5)
---
M tests/test_logger.c
M tests/test_pbx.c
2 files changed, 4 insertions(+), 2 deletions(-)
Approvals:
Corey Farrell: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
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/7394
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.18
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1db5dd1818ac25cc2ae41b644f848b5865b1362
Gerrit-Change-Number: 7394
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171201/eba05228/attachment.html>
More information about the asterisk-code-review
mailing list