diff options
author | Angelo Mantellini <manangel@cisco.com> | 2021-04-30 12:26:57 +0200 |
---|---|---|
committer | Angelo Mantellini <angelo.mantellini@cisco.com> | 2021-04-30 14:54:00 +0200 |
commit | 07133ac060c2af721941f7b47c52c075df3168ba (patch) | |
tree | a3a618442fc9f1adb5f1cf2e3d442c70fd787d2b /apps/higet | |
parent | 39e15ebb3805efb6c71a1dd16f18061cd86487cf (diff) |
[HICN-703] Update windows-sdk and hicn code
Signed-off-by: Angelo Mantellini <@ngelo.mantellini@cisco.com>
Change-Id: I05e4c92ce7de3640f0272afae127e1377862bd3e
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com>
Diffstat (limited to 'apps/higet')
-rw-r--r-- | apps/higet/CMakeLists.txt | 4 | ||||
-rw-r--r-- | apps/higet/higet.cc | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/apps/higet/CMakeLists.txt b/apps/higet/CMakeLists.txt index 1cf14c287..b929a24e4 100644 --- a/apps/higet/CMakeLists.txt +++ b/apps/higet/CMakeLists.txt @@ -31,6 +31,10 @@ list(APPEND APPS_SRC higet.cc ) +if (WIN32) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:\"LIBCMT\"" ) +endif() + if (NOT DISABLE_EXECUTABLES) build_executable(${HIGET} SOURCES ${APPS_SRC} diff --git a/apps/higet/higet.cc b/apps/higet/higet.cc index 194e616ed..9ae869731 100644 --- a/apps/higet/higet.cc +++ b/apps/higet/higet.cc @@ -119,7 +119,7 @@ class ReadBytesCallbackImplementation auto it = std::search(begin, end, begincrlf2, endcrlf2); if (it != end) { chunk_size_ = std::stoul(begin, 0, 16); - content_size_ += chunk_size_; + content_size_ += (long)chunk_size_; payload->trimStart(it + chunk_separator.size() - begin); std::size_t to_write; @@ -131,7 +131,7 @@ class ReadBytesCallbackImplementation } out_->write((char *)payload->data(), to_write); - byte_downloaded_ += to_write; + byte_downloaded_ += (long)to_write; payload->trimStart(to_write); if (payload->length() >= chunk_separator.size()) { @@ -141,7 +141,7 @@ class ReadBytesCallbackImplementation } } else { out_->write((char *)payload->data(), payload->length()); - byte_downloaded_ += payload->length(); + byte_downloaded_ += (long)payload->length(); } if (file_name_ != "-") { @@ -208,7 +208,7 @@ class ReadBytesCallbackImplementation #endif std::cout << "["; - int pos = barWidth * progress; + int pos = barWidth * (int)progress; for (int i = 0; i < barWidth; ++i) { if (i < pos) { std::cout << "="; |