From f9c2e41d6e50c857b57b8cbd015083dbc39ca20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 1 Oct 2012 20:34:49 +0200 Subject: [PATCH] Fix warning about comparison between signed and unsigned ints We assume numeric_limits::max() will not return a negative number, so casting should be safe. --- sparsebundlefs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparsebundlefs.cpp b/sparsebundlefs.cpp index b31bd21..dd260c1 100644 --- a/sparsebundlefs.cpp +++ b/sparsebundlefs.cpp @@ -155,7 +155,7 @@ using namespace std; static off_t read_size(const string &str) { uintmax_t value = strtoumax(str.c_str(), 0, 10); - if (errno == ERANGE || value > numeric_limits::max()) { + if (errno == ERANGE || value > static_cast(numeric_limits::max())) { fprintf(stderr, "Disk image too large to be mounted (%s bytes)\n", str.c_str()); exit(-1); }