-
Notifications
You must be signed in to change notification settings - Fork 278
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
more fixes #2508
more fixes #2508
Conversation
👇 Click on the image for a new way to code review
Legend |
Codecov Report
@@ Coverage Diff @@
## main #2508 +/- ##
==========================================
- Coverage 64.67% 64.66% -0.02%
==========================================
Files 104 104
Lines 22256 22246 -10
Branches 10863 10858 -5
==========================================
- Hits 14394 14385 -9
- Misses 5619 5620 +1
+ Partials 2243 2241 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Pull request has been modified.
d0daf70
to
76a6e7f
Compare
3b19df2
to
355b626
Compare
Found with MSVC's C4244 Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Found with cppcheck. Signed-off-by: Rosen Penev <[email protected]>
cppcheck warns on localtime which is not necessarily threadsafe. Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Using the constructor is one less line. Plus it seems to fix bugs in Apple's clang. Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
shorter Signed-off-by: Rosen Penev <[email protected]>
Remaining warnings. Not too sure about them.
|
DataBuf bytes(byteslen); // allocate a buffer | ||
io.readOrThrow(bytes.data(), byteslen, ErrorCode::kerCorruptedMetadata); // read | ||
MemIo memIo(bytes.c_data(), byteslen); // create a file | ||
auto b = DataBuf(byteslen); // allocate a buffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the benefit of doing it this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC bytes it a shadowed declaration. because of copy elision, it's the same.
if (decodeBase64Table[static_cast<unsigned char>(src[srcPos])] != invalid) | ||
validSrcSize++; | ||
} | ||
auto validSrcSize = static_cast<unsigned long>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use size_t
here? I'd like to eliminate long
from the codebase.
No description provided.