summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Shapovalov <intelfx@intelfx.name>2017-01-24 02:01:08 +0300
committerIvan Shapovalov <intelfx@intelfx.name>2017-01-24 02:55:09 +0300
commit064ba4abd4d4c4d2dfeaa3b22e03d7c83a0d4acb (patch)
tree992f505d53a72eead046849e161c61d98cd90b51
parent519ccbd27354280d4210db1c1fa8f239b1794b14 (diff)
treewide: silence type mismatch warnings in *printf()
-rw-r--r--samples/sgemm.cpp2
-rw-r--r--test/correctness/tester.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/samples/sgemm.cpp b/samples/sgemm.cpp
index b05c390e..b960865b 100644
--- a/samples/sgemm.cpp
+++ b/samples/sgemm.cpp
@@ -106,7 +106,7 @@ int main() {
auto time_ms = std::chrono::duration<double,std::milli>(elapsed_time).count();
// Example completed. See "clblast.h" for status codes (0 -> success).
- printf("Completed SGEMM in %.3lf ms with status %d\n", time_ms, status);
+ printf("Completed SGEMM in %.3lf ms with status %d\n", time_ms, static_cast<int>(status));
return 0;
}
diff --git a/test/correctness/tester.cpp b/test/correctness/tester.cpp
index b1ca8122..efe49811 100644
--- a/test/correctness/tester.cpp
+++ b/test/correctness/tester.cpp
@@ -402,7 +402,9 @@ void Tester<T,U>::PrintErrorLog(const std::vector<ErrorLogEntry> &error_log) {
fprintf(stdout, " Error rate %.1lf%%: ", entry.error_percentage);
}
else {
- fprintf(stdout, " Status code %d (expected %d): ", entry.status_found, entry.status_expect);
+ fprintf(stdout, " Status code %d (expected %d): ",
+ static_cast<int>(entry.status_found),
+ static_cast<int>(entry.status_expect));
}
fprintf(stdout, "%s\n", GetOptionsString(entry.args).c_str());
}