blob: c119f198189b4cb3df723a21b159d734b4475daf [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001From 8ec6f75bf7a318a3a1e352df7c97630cfaba537a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 21 Apr 2017 16:18:39 -0700
4Subject: [PATCH] typecast input parameter to int for abs()
5
6Fixes
7../tests/test.cpp:482:73: error: call of overloaded 'abs(jack_nframes_t)' is ambiguous
8
9because the signature is int abs(int) and its passing
10unsigned int to it.
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 tests/test.cpp | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/tests/test.cpp b/tests/test.cpp
18index 8a8a8117..9655742e 100644
19--- a/tests/test.cpp
20+++ b/tests/test.cpp
21@@ -479,7 +479,7 @@ int process4(jack_nframes_t nframes, void *arg)
22 jack_nframes_t delta_time = cur_time - last_time;
23
24 Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time);
25- if (delta_time > 0 && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) {
26+ if (delta_time > 0 && (jack_nframes_t)abs(int(delta_time - cur_buffer_size)) > tolerance) {
27 printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance);
28 }
29
30--
312.12.2
32