diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-13 06:25:59 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-13 06:25:59 -0700 |
| commit | f72b46690a89a7e19563f93f0eaa5f8a21184254 (patch) | |
| tree | f2434ad442d94ebecb6883aa43f3d443dd34a0fb | |
| parent | 511128b1c0478e02b50ca27ed7b8b0af3a6b91f1 (diff) | |
| download | vcpkg-f72b46690a89a7e19563f93f0eaa5f8a21184254.tar.gz vcpkg-f72b46690a89a7e19563f93f0eaa5f8a21184254.zip | |
[vcpkg] Silence warnings on recent clang
| -rw-r--r-- | toolsrc/include/pch.h | 4 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/metrics.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 683bef171..9c9deeb3f 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -46,7 +46,11 @@ #include <set> #include <stdexcept> #include <string> +#if defined(_WIN32) #include <sys/timeb.h> +#else +#include <sys/time.h> +#endif #include <sys/types.h> #include <system_error> #include <thread> diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index d49cadbe2..9e17b237d 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -92,7 +92,7 @@ namespace vcpkg::Metrics { encoded.append("\\\""); } - else if (ch < 0x20 || ch >= 0x80) + else if (ch < 0x20 || static_cast<unsigned char>(ch) >= 0x80) { // Note: this treats incoming Strings as Latin-1 static constexpr const char HEX[16] = { |
