Conversation
* Add blank line before TEST macro to fix coverage line mismatch * Verify tests pass after fix * Remove CodeQL build artifacts and update .gitignore --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JurgenLB <77586573+JurgenLB@users.noreply.github.com>
Add concurrency settings to traits job in workflow
…gned int (#6) * Fix C4244 warnings by adding explicit static_cast to unsigned int * Remove unnecessary OpenSSL version conditionals since code is now identical * remove unwanted files
…ouble>() path (#8) * fix: suppress sign-conversion and float-conversion warnings in picojson.h On line 387 of picojson.h (PICOJSON_USE_INT64 path): - Add static_cast<double>(u_.int64_) to fix 'implicit conversion from int64_t to double may lose precision' warning - Append , true to &&'s right-side comma expression so the result is bool instead of double, fixing 'implicit conversion turns floating-point number into integer: double to bool' warning - Wrap the entire && expression in (void)() to prevent the -Wunused-value warning that would otherwise arise from the bool result being the left operand of the outer comma operator Co-authored-by: JurgenLB <77586573+JurgenLB@users.noreply.github.com> * chore: add _codeql_build_dir to .gitignore and remove it from tracking Co-authored-by: JurgenLB <77586573+JurgenLB@users.noreply.github.com> * Remove entries from .gitignore --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JurgenLB <77586573+JurgenLB@users.noreply.github.com>
|
Can you share the compilation flags you are using? It would be a shame to fix all of these and have them come back. I'd like to add a test in CI if possible |
| ec.clear(); | ||
| std::string res(static_cast<size_t>(EVP_MAX_MD_SIZE), '\0'); | ||
| auto len = static_cast<unsigned int>(res.size()); | ||
| unsigned int len = static_cast<unsigned int>(res.size()); |
There was a problem hiding this comment.
Any reason why auto wassufficemt?
There was a problem hiding this comment.
Your right looking at the code auto should do just fine,
I will try to change that.
Kind regards
|
copilot now says; Let me look at what functions these are and their signatures to understand if there's a C4244 warning: OSSL_PARAM_BLD_push_utf8_string(param_bld.get(), "group", group.data(), group.size()) - takes size_t. group.size() returns size_t. No C4244. EVP_DigestSignUpdate(ctx.get(), ..., data.size()) - on wolfSSL, this takes size_t. data.size() is size_t. No C4244. EVP_DigestSign(ctx.get(), ..., data.size()) - takes size_t. No C4244. EVP_DigestVerifyUpdate(ctx.get(), ..., data.size()) - takes size_t. No C4244. EVP_DigestVerify(ctx.get(), ..., data.size()) - takes size_t. No C4244. Now I need to focus on where the actual issue is. Looking at the basic_claim constructor that takes a date parameter... I'm examining how the constructor converts the epoch time to an integer type. When integer_type is int32_t, we're casting a long_long value from the duration count, which should be an explicit conversion that MSVC wouldn't warn about. But I need to verify whether MSVC treats functional casts differently from static_cast when it comes to C4244 warnings—the documentation says it fires for implicit conversions. Try with stricter conversion warnings EVP_DigestVerifyFinaltookunsigned intfor the signature length in 1.0.x but switched tosize_tin 1.1.0+. |
* Fix C4244 warning: remove unnecessary int cast in HMAC data size parameter * Remove build artifacts from tracking and update .gitignore * Update .gitignore to remove specific entries Remove entries for FindLibreSSL.cmake and other files.
completed the fix for the MSVC C4244 warning that was appearing in the AppVeyor build.
Two compiler warnings from include/picojson/picojson.h line 387 when compiling with -Wsign-conversion -Wconversion:
implicit conversion from 'int64_t' to 'double' may lose precision — u_.int64_ was implicitly cast to double for the u_.number_ assignment
implicit conversion turns floating-point number into integer: 'double' to 'bool' — the assignment result (double) was the right operand of &&, requiring implicit float→bool conversion
Kind regards