mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
clang compiler warnings: Fix various warnings for tests
This patch fixes a variety of clang compiler warnings for unit tests. This includes autological comparison issues, ignored return values, and interestingly enough, one embedded function. Fun! Review: https://reviewboard.asterisk.org/r/4555 ASTERISK-24917 Reported by: dkdegroot patches: rb4555.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434705 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -202,7 +202,7 @@ static char *handle_cli_sched_bench(struct ast_cli_entry *e, int cmd, struct ast
|
||||
start = ast_tvnow();
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
int when = abs(ast_random()) % 60000;
|
||||
long when = labs(ast_random()) % 60000;
|
||||
if ((sched_ids[i] = ast_sched_add(con, when, sched_cb, NULL)) == -1) {
|
||||
ast_cli(a->fd, "Test failed - sched_add returned -1\n");
|
||||
goto return_cleanup;
|
||||
|
Reference in New Issue
Block a user