aboutsummaryrefslogtreecommitdiff
path: root/unittest/test_C_API.cpp
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-04-19 11:59:12 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2018-04-19 12:11:09 +0200
commitbc4e9c7bcfd7d7b3f62b23e583ef216a05975e80 (patch)
tree6fdeea27d6b55e713554216b00b6922d3451a504 /unittest/test_C_API.cpp
parent5b36f06f49c88fb1921da18f54524081729cb4d5 (diff)
downloadlibnitrokey-bc4e9c7bcfd7d7b3f62b23e583ef216a05975e80.tar.gz
libnitrokey-bc4e9c7bcfd7d7b3f62b23e583ef216a05975e80.tar.bz2
Fix compilation warnings for tests
Cleanup CMakeList a bit as well. Fixes #97 Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_C_API.cpp')
-rw-r--r--unittest/test_C_API.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/unittest/test_C_API.cpp b/unittest/test_C_API.cpp
index 2d83ef4..acfadd2 100644
--- a/unittest/test_C_API.cpp
+++ b/unittest/test_C_API.cpp
@@ -74,7 +74,7 @@ TEST_CASE("multiple devices with ID", "[BASIC]") {
int t;
string = strndup(s, 4096);
- free ( (void*) s);
+ free (static_cast<void*>(const_cast<char*>(s)));
while ((token = strsep(&string, ";")) != nullptr){
if (strnlen(token, 4096) < 3) continue;