util: fix -Wshorten-64-to-32 warnings#12481
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12481 +/- ##
==========================================
+ Coverage 80.52% 80.54% +0.01%
==========================================
Files 923 923
Lines 259176 259204 +28
==========================================
+ Hits 208708 208778 +70
+ Misses 50468 50426 -42
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Information: QA ran without warnings. Pipeline 24364 |
| size_t count = 0; | ||
| int count = 0; | ||
| SCFmem *mem = handler; | ||
| size_t available = mem->size - mem->pos; |
There was a problem hiding this comment.
where is checked that his result fits an int?
There was a problem hiding this comment.
while (count < size) where size is an int from the function prototype
There was a problem hiding this comment.
it looks very hacky. size_t actually does look like the correct type here, and the change should probably that the function arg size is also made size_t
|
Setting as draft as I cannot set changes requested to myself |
|
Next in #12534 |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6186
Describe changes:
-Wshorten-64-to-32warnings for some files : utilSome commits of #9840
#11952 next batch
Still to do afterwards :