-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
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 |
@@ -148,16 +148,16 @@ static int ReadFn(void *handler, char *buf, int size) | |||
*/ | |||
static int WriteFn(void *handler, const char *buf, int size) | |||
{ | |||
size_t count = 0; | |||
int count = 0; | |||
SCFmem *mem = handler; | |||
size_t available = mem->size - mem->pos; |
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.
where is checked that his result fits an int
?
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.
while (count < size)
where size
is an int from the function prototype
Setting as draft as I cannot set changes requested to myself |
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.
@catenacyber fixed
Next in #12534 |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6186
Describe changes:
-Wshorten-64-to-32
warnings for some files : utilSome commits of #9840
#11952 next batch
Still to do afterwards :