Skip to content
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

"'argument': conversion from 'size_t' to 'long', possible loss of data" Windows build x64 #140

Closed
TaeZStkyoht opened this issue Apr 21, 2021 · 1 comment · Fixed by #141
Assignees

Comments

@TaeZStkyoht
Copy link

TaeZStkyoht commented Apr 21, 2021

My OS is Windows and I'm using the latest version (0.5.0) that vcpkg provides. There was no warning on the previous version (0.4.0) but this version has. If I build x86 then there is no problem; however, If I build x64 (both Debug and Release) then it gives warnings below and it's really annoying:

"blabla\vcpkg\installed\x64-windows\include\jwt-cpp\jwt.h(441,1): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data"

The problem is in the 'convert_base64_der_to_pem' function's line:

std::unique_ptr<X509, decltype(&X509_free)> cert(d2i_X509(NULL, &c_str, decodedStr.size()), X509_free);

@prince-chrismc prince-chrismc self-assigned this Apr 21, 2021
@prince-chrismc
Copy link
Collaborator

prince-chrismc commented Apr 21, 2021

I saw this too... Ill push a fix soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants