Skip to content

util: fix -Wshorten-64-to-32 warnings#12633

Closed
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:warnint-64to32-6186-v22
Closed

util: fix -Wshorten-64-to-32 warnings#12633
catenacyber wants to merge 1 commit intoOISF:masterfrom
catenacyber:warnint-64to32-6186-v22

Conversation

@catenacyber
Copy link
Contributor

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6186

Describe changes:

  • fix -Wshorten-64-to-32 warnings for some files : util

One commit of #9840
#12624 CI fixed

Still to do afterwards :

  • detect
  • CI check

@codecov
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 73.33333% with 32 lines in your changes missing coverage. Please review.

Project coverage is 80.75%. Comparing base (6fc617c) to head (d4b425a).
Report is 22 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12633      +/-   ##
==========================================
- Coverage   80.77%   80.75%   -0.02%     
==========================================
  Files         932      932              
  Lines      259286   259314      +28     
==========================================
- Hits       209437   209413      -24     
- Misses      49849    49901      +52     
Flag Coverage Δ
fuzzcorpus 57.01% <49.16%> (+<0.01%) ⬆️
livemode 19.36% <23.33%> (-0.01%) ⬇️
pcap 44.12% <45.00%> (-0.03%) ⬇️
suricata-verify 63.46% <49.16%> (-0.02%) ⬇️
unittests 58.34% <42.50%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 24806

Copy link
Member

@victorjulien victorjulien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a nit inline, but can also address that in a follow up

}
if (b > max) {
SCLogError("%s: upper bound (%ld) of cpu set is too high, only %d cpu(s)", name, b,
SCLogError("%s: upper bound (%d) of cpu set is too high, only %d cpu(s)", name, b,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%u now that b is uint32_t. Surprising no CI check rejected this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, should I fix that in the next PR tackling other warnings ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, staging branch with this PR is running

@victorjulien victorjulien added this to the 8.0 milestone Feb 20, 2025
@victorjulien
Copy link
Member

Merged in #12653, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants