diff --git a/include/pistache/os.h b/include/pistache/os.h index 888a800cf..7881ba4c8 100644 --- a/include/pistache/os.h +++ b/include/pistache/os.h @@ -96,8 +96,8 @@ namespace Pistache { } constexpr TagValue value() const { return value_; } - uint64_t valueU64() const { return (static_cast - (reinterpret_cast(value_))); } + uint64_t valueU64() const { return (PS_FD_CAST_TO_UNUM(uint64_t, value_)); } + #ifndef _USE_LIBEVENT constexpr #endif diff --git a/include/pistache/transport.h b/include/pistache/transport.h index 6cffa617a..6245e6759 100644 --- a/include/pistache/transport.h +++ b/include/pistache/transport.h @@ -150,7 +150,7 @@ namespace Pistache::Tcp bool isFile() const { return type == File; } bool isRaw() const { return type == Raw; } size_t size() const { return size_; } - size_t offset() const { return offset_; } + size_t offset() const { return static_cast(offset_); } int fd() const { @@ -171,7 +171,7 @@ namespace Pistache::Tcp if (!isRaw()) return BufferHolder(_fd, size_, offset); - auto detached = _raw.copy(offset); + auto detached = _raw.copy(static_cast(offset)); return BufferHolder(detached); } diff --git a/src/common/http.cc b/src/common/http.cc index d9e5dd07d..9c52f3ab7 100644 --- a/src/common/http.cc +++ b/src/common/http.cc @@ -1223,7 +1223,7 @@ namespace Pistache::Http PST_OUT(writeHeaders(writer.headers(), *buf)); - const size_t len = sb.st_size; + const size_t len = static_cast(sb.st_size); PST_OUT(writeHeader(os, len)); diff --git a/version.txt b/version.txt index 861d507fc..9a8a7cb62 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.4.21.20241121 +0.4.22.20241122