Skip to content

Comments

Warnint 64to32 6186 v21.1#11519

Closed
catenacyber wants to merge 5 commits intoOISF:masterfrom
catenacyber:warnint-64to32-6186-v21.1
Closed

Warnint 64to32 6186 v21.1#11519
catenacyber wants to merge 5 commits intoOISF:masterfrom
catenacyber:warnint-64to32-6186-v21.1

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 : defrag, datasets, suricata.c, runmodes
  • adds -Wimplicit-int-float-conversion to the set of warning flags used by ./configure --enable-warnings

Some commits of #9840
#11453 next batch
#11517 final version getting green CI with clean git history

Still to do afterwards :

  • detect
  • log
  • output
  • source
  • stream
  • util

When configure is used with --enable-warnings, we try to add most
warning flags that should pass.
This commits adds the warning Wimplicit-int-float-conversion
@catenacyber catenacyber requested review from a team and victorjulien as code owners July 17, 2024 18:23
@codecov
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 35.82090% with 43 lines in your changes missing coverage. Please review.

Project coverage is 82.66%. Comparing base (bce8f4b) to head (014f685).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11519   +/-   ##
=======================================
  Coverage   82.66%   82.66%           
=======================================
  Files         918      918           
  Lines      247447   247486   +39     
=======================================
+ Hits       204543   204595   +52     
+ Misses      42904    42891   -13     
Flag Coverage Δ
fuzzcorpus 60.94% <7.46%> (+<0.01%) ⬆️
livemode 18.72% <22.38%> (-0.01%) ⬇️
pcap 43.86% <8.95%> (+0.04%) ⬆️
suricata-verify 61.64% <22.38%> (+<0.01%) ⬆️
unittests 59.29% <7.46%> (-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 21597

}
}

static bool json_u32_value(json_t *jarg, uint32_t *ret)
Copy link
Member

Choose a reason for hiding this comment

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

style is off

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changing it to JsonU32Value, I was imitating json_integer_value style

}
bpf_len = st.st_size + 1;
if ((uint64_t)st.st_size > UINT32_MAX - 1) {
SCLogError("Too big file %s", filename);
Copy link
Member

Choose a reason for hiding this comment

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

think this reads a bit oddly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removing this commit for now

@catenacyber
Copy link
Contributor Author

Continued in #11524

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