From 5a24f32273a1afe6608fa2e8139e594d9de602b0 Mon Sep 17 00:00:00 2001 From: JurgenLB <77586573+JurgenLB@users.noreply.github.com> Date: Sun, 8 Mar 2026 13:55:57 +0100 Subject: [PATCH 1/4] undo unwanted changes from #405 and #408 --- include/jwt-cpp/jwt.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h index f01a42f7d..408d9c8c5 100644 --- a/include/jwt-cpp/jwt.h +++ b/include/jwt-cpp/jwt.h @@ -1626,7 +1626,7 @@ namespace jwt { ec = error::signature_generation_error::signinit_failed; return {}; } - if (!EVP_DigestUpdate(ctx.get(), data.data(), static_cast(data.size()))) { + if (!EVP_DigestUpdate(ctx.get(), data.data(), data.size())) { ec = error::signature_generation_error::digestupdate_failed; return {}; } @@ -1666,7 +1666,7 @@ namespace jwt { ec = error::signature_verification_error::verifyinit_failed; return; } - if (!EVP_DigestUpdate(ctx.get(), data.data(), static_cast(data.size()))) { + if (!EVP_DigestUpdate(ctx.get(), data.data(), data.size())) { ec = error::signature_verification_error::verifyupdate_failed; return; } @@ -1985,7 +1985,7 @@ namespace jwt { return {}; } #endif - if (EVP_DigestUpdate(md_ctx.get(), data.data(), static_cast(data.size())) != 1) { + if (EVP_DigestUpdate(md_ctx.get(), data.data(), data.size()) != 1) { ec = error::signature_generation_error::digestupdate_failed; return {}; } @@ -2034,7 +2034,7 @@ namespace jwt { return; } #endif - if (EVP_DigestUpdate(md_ctx.get(), data.data(), static_cast(data.size())) != 1) { + if (EVP_DigestUpdate(md_ctx.get(), data.data(), data.size()) != 1) { ec = error::signature_verification_error::verifyupdate_failed; return; } From 5119b799d7836ff845b742cad443bc1fef4d527e Mon Sep 17 00:00:00 2001 From: JurgenLB <77586573+JurgenLB@users.noreply.github.com> Date: Sun, 8 Mar 2026 14:56:13 +0100 Subject: [PATCH 2/4] Cast asInt64 result to integer_type --- include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h b/include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h index 400206e4e..dae13357d 100644 --- a/include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h +++ b/include/jwt-cpp/traits/open-source-parsers-jsoncpp/traits.h @@ -87,7 +87,7 @@ namespace jwt { static integer_type as_integer(const value_type& val) { switch (val.type()) { - case Json::intValue: return val.asInt64(); + case Json::intValue: return static_cast(val.asInt64()); case Json::uintValue: return static_cast(val.asUInt64()); default: throw std::bad_cast(); } From 9b9c351b87ba6a18d6e2e97192371ce65e276cad Mon Sep 17 00:00:00 2001 From: JurgenLB <77586573+JurgenLB@users.noreply.github.com> Date: Sun, 8 Mar 2026 15:34:10 +0100 Subject: [PATCH 3/4] Fix double type handling for int64_type --- include/picojson/picojson.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/picojson/picojson.h b/include/picojson/picojson.h index 76742fe06..10968e1ef 100644 --- a/include/picojson/picojson.h +++ b/include/picojson/picojson.h @@ -384,7 +384,7 @@ GET(array, *u_.array_) GET(object, *u_.object_) #ifdef PICOJSON_USE_INT64 GET(double, - (type_ == int64_type && (const_cast(this)->type_ = number_type, (const_cast(this)->u_.number_ = u_.int64_)), + ((void)(type_ == int64_type && (const_cast(this)->type_ = number_type, (const_cast(this)->u_.number_ = static_cast(u_.int64_)), true)), u_.number_)) GET(int64_t, u_.int64_) #else From eada5ff1aae5285663b0ca1cf47782a7b20cf2f7 Mon Sep 17 00:00:00 2001 From: JurgenLB <77586573+JurgenLB@users.noreply.github.com> Date: Sun, 8 Mar 2026 22:09:42 +0100 Subject: [PATCH 4/4] unwanted change --- include/picojson/picojson.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/picojson/picojson.h b/include/picojson/picojson.h index 10968e1ef..76742fe06 100644 --- a/include/picojson/picojson.h +++ b/include/picojson/picojson.h @@ -384,7 +384,7 @@ GET(array, *u_.array_) GET(object, *u_.object_) #ifdef PICOJSON_USE_INT64 GET(double, - ((void)(type_ == int64_type && (const_cast(this)->type_ = number_type, (const_cast(this)->u_.number_ = static_cast(u_.int64_)), true)), + (type_ == int64_type && (const_cast(this)->type_ = number_type, (const_cast(this)->u_.number_ = u_.int64_)), u_.number_)) GET(int64_t, u_.int64_) #else