mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
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
This commit is contained in:
@@ -190,7 +190,7 @@ static char *handle_cli_performance_test(struct ast_cli_entry *e, int cmd, struc
|
|||||||
|
|
||||||
static char *handle_cli_queue_test(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
|
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;
|
int current_queue_limit;
|
||||||
unsigned int x;
|
unsigned int x;
|
||||||
struct timeval start, end;
|
struct timeval start, end;
|
||||||
@@ -220,7 +220,7 @@ static char *handle_cli_queue_test(struct ast_cli_entry *e, int cmd, struct ast_
|
|||||||
ast_cli(a->fd, "Test: Failed, could not register level 'queuetest'.\n");
|
ast_cli(a->fd, "Test: Failed, could not register level 'queuetest'.\n");
|
||||||
return CLI_SUCCESS;
|
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) {
|
if (ast_logger_create_channel(tmppath, "queuetest") != AST_LOGGER_SUCCESS) {
|
||||||
ast_cli(a->fd, "Test: Unable to create logger channel '%s'\n", tmppath);
|
ast_cli(a->fd, "Test: Unable to create logger channel '%s'\n", tmppath);
|
||||||
|
@@ -37,6 +37,8 @@
|
|||||||
#include "asterisk/pbx.h"
|
#include "asterisk/pbx.h"
|
||||||
#include "asterisk/test.h"
|
#include "asterisk/test.h"
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* If we determine that we really need
|
* If we determine that we really need
|
||||||
* to be able to register more than 10
|
* to be able to register more than 10
|
||||||
|
Reference in New Issue
Block a user