From beb0d1b550e359ca0c85f7784db73bb0adc1a6c8 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 7 Sep 2016 20:45:50 -0500 Subject: [PATCH] Address some Visual C++ compiler warnings --- src/ox/fs/filestore.hpp | 1 + src/ox/std/strops.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ox/fs/filestore.hpp b/src/ox/fs/filestore.hpp index 110d254f8..52fa87192 100644 --- a/src/ox/fs/filestore.hpp +++ b/src/ox/fs/filestore.hpp @@ -478,6 +478,7 @@ FsSize_t FileStore::iterator() { return ptr(lastInode()) + lastInode()->size(); } +#pragma warning(disable:4244) template FsSize_t FileStore::ptr(void *ptr) { return ((ox::std::uint8_t*) ptr) - begin(); diff --git a/src/ox/std/strops.cpp b/src/ox/std/strops.cpp index c8ef10960..62e5f39c8 100644 --- a/src/ox/std/strops.cpp +++ b/src/ox/std/strops.cpp @@ -34,7 +34,7 @@ int atoi(const char *str) { int total = 0; int multiplier = 1; - for (int i = strlen(str) - 1; i >= 0; i--) { + for (size_t i = strlen(str) - 1; i >= 0; i--) { total += (str[i] - '0') * multiplier; multiplier *= 10; }