-
Notifications
You must be signed in to change notification settings - Fork 111
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
[Fix] [Issue 338] Inconsistent id types #342
Conversation
@@ -1212,7 +1212,7 @@ | |||
} | |||
|
|||
unsigned int zippedBytes; | |||
zippedBytes = gzwrite(outFileZ, content_ptr, strlen(content_ptr)); | |||
zippedBytes = gzwrite(outFileZ, content_ptr, (unsigned int)strlen(content_ptr)); |
Check notice
Code scanning / Flawfinder (reported by Codacy)
Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Note
@@ -3078,7 +3078,7 @@ | |||
while (true) { | |||
// Go sequentially through buckets till one non-empty | |||
// bucket is found | |||
while (B[idx].size() == 0 && idx < maxWeight * V) { | |||
while (B[idx].size() == 0u && idx < maxWeight * V) { |
Check warning
Code scanning / Cppcheck (reported by Codacy)
Array index 'idx' is used before limits check. Warning
@@ -1212,7 +1212,7 @@ | |||
} | |||
|
|||
unsigned int zippedBytes; | |||
zippedBytes = gzwrite(outFileZ, content_ptr, strlen(content_ptr)); | |||
zippedBytes = gzwrite(outFileZ, content_ptr, (unsigned int)strlen(content_ptr)); |
Check warning
Code scanning / Cppcheck (reported by Codacy)
Variable 'zippedBytes' is assigned a value that is never used. Warning
Looks like the test for Tarjan's segfaults on
Also there seems to be some failure in Partitioning with releasing an unowned mutex on MSVC. Both of these issues seem to be present on |
Codacity says the macro is unsafe because it can't resolve the type. We should probably add an argument to the codacity action to ignore it (with |
This problem seems to be on Windows machine ( |
have you the opportunity to try some other checks on this? |
Which other checks are you referring to? I ran the tests we have at-desk, and everything seems to pass (except for the Partition test due to the known unowned mutex bug) |
Codecov Report
@@ Coverage Diff @@
## master #342 +/- ##
==========================================
- Coverage 97.31% 97.30% -0.02%
==========================================
Files 55 55
Lines 8455 8455
==========================================
- Hits 8228 8227 -1
- Misses 227 228 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This PR seems to be in a pretty good state now. There's no build warnings on either mac or Windows, which is a breath of fresh air. |
Link to issue: #338
This PR fixes the inconsistent
id
issues throughout the library.I also added explicit casts in many places to squelch compiler warnings coming from MSVC.
@ZigRazor This PR represents an API-breaking change and forces us to do a major release.