From 7ea305d02177e9fcba351012440f6453974b42ff Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 2 Nov 2014 19:37:48 -0500 Subject: [PATCH] reinterpret_cast for parseCacheControl to avoid -Wformat warning on all platforms --- src/storage/response.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/response.cpp b/src/storage/response.cpp index d00d6d335..e3cc66e60 100644 --- a/src/storage/response.cpp +++ b/src/storage/response.cpp @@ -9,7 +9,7 @@ int64_t Response::parseCacheControl(const char *value) { uint64_t seconds = 0; // TODO: cache-control may contain other information as well: // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 - if (std::sscanf(value, "max-age=%llu", static_cast(&seconds)) == 1) { + if (std::sscanf(value, "max-age=%llu", reinterpret_cast(&seconds)) == 1) { return std::chrono::duration_cast( std::chrono::system_clock::now().time_since_epoch()).count() + seconds;