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:
Matthew Jordan
2015-04-11 15:26:45 +00:00
parent 4cf7d0bf01
commit d0d78d5732
4 changed files with 29 additions and 25 deletions

View File

@@ -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;