danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Pre-init values to avoid valgrind warnings #342

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

This PR introduces some code-fixes for valgrind as it's reports that branches depend on unitiaized values.

Although it's technically true, it's never going to happen as if it's not possible to read data from the disk or process them the code will abort its execution using FATAL, valgrind can't detect it properly hence it reports a warning.

To facilitate the debugging with valgrind these warnings are being addressed.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.03 :warning:

Comparison is base (7a713b8) 77.13% compared to head (41f3e90) 77.10%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #342 +/- ## ========================================== - Coverage 77.13% 77.10% -0.03% ========================================== Files 179 179 Lines 12416 12402 -14 ========================================== - Hits 9576 9562 -14 Misses 2840 2840 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `77.10% <0.00%> (-0.03%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/danielealbano/cachegrand/pull/342?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) | Coverage Δ | | |---|---|---| | [...module/redis/snapshot/module\_redis\_snapshot\_load.c](https://codecov.io/gh/danielealbano/cachegrand/pull/342?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9zbmFwc2hvdC9tb2R1bGVfcmVkaXNfc25hcHNob3RfbG9hZC5j) | `0.00% <0.00%> (ø)` | | ... and [6 files with indirect coverage changes](https://codecov.io/gh/danielealbano/cachegrand/pull/342/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.