add -Werror to os x as well

This commit is contained in:
Konstantin Käfer
2014-11-06 14:18:52 +01:00
parent d7cfc05cea
commit 618a4a5785
2 changed files with 3 additions and 3 deletions

View File

@@ -14,7 +14,7 @@
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI':'YES',
'OTHER_CPLUSPLUSFLAGS': [ '-Wall', '-Wextra', '-Wshadow', '-Wno-variadic-macros', '-frtti', '-fexceptions' ],
'OTHER_CPLUSPLUSFLAGS': [ '-Werror', '-Wall', '-Wextra', '-Wshadow', '-Wno-variadic-macros', '-frtti', '-fexceptions' ],
'GCC_WARN_PEDANTIC': 'YES',
'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE',
},

View File

@@ -6,10 +6,10 @@ namespace mbgl {
int64_t Response::parseCacheControl(const char *value) {
if (value) {
uint64_t seconds = 0;
unsigned long long 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=%lu", &seconds) == 1) {
if (std::sscanf(value, "max-age=%llu", &seconds) == 1) {
return std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch()).count() +
seconds;