-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation errors (VS 2022 32-bit /W3 /SDL) #278
Comments
Hmm, never heard of I would love to see a PR with these fixes 🙏 |
I'll see what I can do. I use git elsewhere but I'm quite new to using it with github 😬 |
It's the same tbh, just create a fork (there a button top left) then It sounds like a lot but the CLI will even output hints along the way with links! |
A followup issue - using nlohmann json with jwt-cpp has additional errors for 32-bit builds. The source of this is that |
Windows 32-bit?! I've not touched that in 8 years :) I have no idea. |
Yeah, I have a few things I have to build as 32-bit for... historical reasons. I guess there's mainly a question of intent here. If there is a reason |
When building a project that uses the jwt-cpp header in Visual Studio 2022 with warning level 3 and SDL checks enabled there are several errors raised related to suspicious implicit casts. These can be easily solved with a few tweaks. Specifically:
jwt::alphabet::index
is currently auint32_t
, which is smaller than theptrdiff_t
that the call tostd::distance
returns. The return value can be switched tosize_t
to solve this.sextet_*
andtriple
variables injwt::base::details::decode
call the above and so need to besize_t
as well.In modern C++ both of the above points can be solved with
auto
in preference to specifying the types.system_clock::from_time_t
injwt::basic_claim::as_date
requires astatic_cast
to atime_t
.I was going to raise an issue about a common base class for exceptions, but it looks like someone got there first :)
The text was updated successfully, but these errors were encountered: