aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorChun-Min Chang <[email protected]>2019-06-10 17:22:33 -0700
committerMatthew Gregan <[email protected]>2019-06-11 12:22:33 +1200
commit03eb237c3bd484d53c34c0cb55f95b65f95ec965 (patch)
treee6bb9ead40385b919cd7e24cf2f622695bb294ab /tools
parentacbed7de511e94df95c8ca8d15628d8403dfdcbc (diff)
downloadcubeb-03eb237c3bd484d53c34c0cb55f95b65f95ec965.tar.gz
cubeb-03eb237c3bd484d53c34c0cb55f95b65f95ec965.zip
Fix tests warnings (#512)
* Using unsigned long-long modifier in fprintf * Remove unnecessary lambda captures * Align naming conventions among the functions * Replace llu by PRIu64 * Define __STDC_FORMAT_MACROS * Using default capture
Diffstat (limited to 'tools')
-rw-r--r--tools/cubeb-test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/cubeb-test.cpp b/tools/cubeb-test.cpp
index fab9ab8..7c35a03 100644
--- a/tools/cubeb-test.cpp
+++ b/tools/cubeb-test.cpp
@@ -1,9 +1,11 @@
+#define __STDC_FORMAT_MACROS
#include "cubeb/cubeb.h"
#include <atomic>
#include <cassert>
#include <cmath>
#include <cstdarg>
#include <cstring>
+#include <inttypes.h>
#include <iostream>
#ifdef _WIN32
#include <objbase.h> // Used by CoInitialize()
@@ -332,7 +334,7 @@ bool choose_action(const cubeb_client& cl, operation_data * op, char c) {
}
} else if (c == 'c') {
uint64_t pos = cl.get_stream_position();
- fprintf(stderr, "stream position %lu\n", pos);
+ fprintf(stderr, "stream position %" PRIu64 "\n", pos);
} else if (c == 'i') {
op->collection_device_type = CUBEB_DEVICE_TYPE_INPUT;
fprintf(stderr, "collection device type changed to INPUT\n");