Skip to content

Conversation

@jaredmauch
Copy link

Fix compiler warnings about comparing signed and unsigned integers by casting arithmetic expressions to size_t to match the type of *length parameter.

Fixed in functions:

  • ospfAreaRangeLookup
  • ospfHostLookup
  • ospfIfLookup
  • ospfIfMetricLookup
  • ospfVirtIfLookup
  • ospfNbrLookup
  • ospfExtLsdbLookup

@frrbot frrbot bot added the ospf label Nov 13, 2025
@jaredmauch jaredmauch force-pushed the ospf_snmp_compile_fixes branch from ffed024 to e63388a Compare November 13, 2025 02:06
@frrbot frrbot bot added the bugfix label Nov 13, 2025
@jaredmauch
Copy link
Author

Possibly related: #20020

@ton31337
Copy link
Member

Still relevant after #20020?

@jaredmauch
Copy link
Author

I would suggest yes as the underlying type in v->namelen isn't size_t - so a compiler will warn in the future or with -pedantic or -Wall about this mismatch, the alternative would be to change namelen in trap_object to be size_t but that code uses -1 to mean undefined

@ton31337
Copy link
Member

Please drop merge commits.

@frrbot frrbot bot added bgp documentation tests Topotests, make check, etc vrrp zebra labels Nov 19, 2025
@github-actions github-actions bot added size/XXL and removed size/S labels Nov 19, 2025
Fix compiler warnings about comparing signed and unsigned integers
by casting arithmetic expressions to size_t to match the type of
*length parameter.

Fixed in functions:
- ospfAreaRangeLookup
- ospfHostLookup
- ospfIfLookup
- ospfIfMetricLookup
- ospfVirtIfLookup
- ospfNbrLookup
- ospfExtLsdbLookup

Signed-off-by: jared mauch <[email protected]>
@jaredmauch jaredmauch force-pushed the ospf_snmp_compile_fixes branch from 7fea652 to bc1836d Compare November 19, 2025 02:38
@github-actions github-actions bot added size/S and removed size/XXL labels Nov 19, 2025
@ton31337 ton31337 merged commit 974510d into FRRouting:master Nov 21, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants