Refines code quality and addresses warnings#295
Merged
Conversation
Casts unused function parameters to void to suppress compiler warnings, addressing static analysis findings. Also refactors a nested conditional for improved readability and reduced complexity.
Refactors conditional expressions for clarity and factors common terms. Consolidates duplicate `case` blocks in the state machine, reducing redundancy and improving maintainability. These changes address static analysis findings.
Replaces a C-style array with `std::array` for improved type safety and resource management. Also introduces `auto` for variable type deduction, aligning with modern C++ best practices and addressing static analysis findings.
Casts unused function parameters to void to suppress compiler warnings. Additionally, refactors conditional expressions for byte resizing into a more concise form. These changes address static analysis findings.
Removes unnecessary explicit type casts where the variable is already compatible, improving code clarity and addressing a static analysis finding.
Updates the type of 'stream_start' to reflect that the data it points to is not modified, addressing a static analysis finding.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This pull request improves code quality and readability by addressing various static analysis findings and compiler warnings across the codebase.
Key changes include:
(void)casts in CLI and Python wrapper functions.(size_t),(uint32_t),(int64_t)), simplifying expressions in compression, decompression, and dispatch logic.fseekochecks and cleaning up ternary operators.constcorrectness for a stream pointer in the Huffman encoding module.std::arrayfor fixed-size buffers andautofor type deduction.zxc_pstream.cby removing a redundantCS_DRAIN_HEADERcase.Relates to SonarQube findings.