diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-31 13:43:11 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-31 14:20:58 +0200 |
commit | bf289b885768ae5db4e15e18f66390595a2b20f3 (patch) | |
tree | 65c99289e58c9492d2510a7f4d918318c71c7e10 /misc.cc | |
parent | 9892ae74c8e828d163e797b9a309972bbe8ef367 (diff) | |
download | libnitrokey-bf289b885768ae5db4e15e18f66390595a2b20f3.tar.gz libnitrokey-bf289b885768ae5db4e15e18f66390595a2b20f3.tar.bz2 |
Fix compilation warnings
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'misc.cc')
-rw-r--r-- | misc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -23,7 +23,7 @@ namespace misc { data.reserve(d_size); char buf[2]; - for(int i=0; i<s_size; i++){ + for(size_t i=0; i<s_size; i++){ char c = hexString[i]; bool char_from_range = (('0' <= c && c <='9') || ('A' <= c && c <= 'F') || ('a' <= c && c<= 'f')); @@ -47,7 +47,7 @@ namespace misc { for (const char *pend = p + size; p < pend;) { if (print_header){ - snprintf(formatbuf, 128, "%04lx\t", p - pstart); + snprintf(formatbuf, 128, "%04dx\t", static_cast<int> (p - pstart)); out << formatbuf; } |