Page MenuHomeFreeBSD

elftoolchain: Consistently use item count as the first argument to calloc
ClosedPublic

Authored by jhb on Jul 17 2024, 7:16 PM.
Tags
None
Referenced Files
F101990589: D46007.diff
Wed, Nov 6, 6:35 AM
Unknown Object (File)
Tue, Oct 22, 9:03 AM
Unknown Object (File)
Oct 2 2024, 6:23 AM
Unknown Object (File)
Sep 23 2024, 4:16 AM
Unknown Object (File)
Sep 16 2024, 8:12 AM
Unknown Object (File)
Sep 16 2024, 8:12 AM
Unknown Object (File)
Sep 16 2024, 8:12 AM
Unknown Object (File)
Sep 8 2024, 10:23 PM

Details

Summary

Reported by: GCC 14 -Wcalloc-transposed-args

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste added a subscriber: jkoshy.

Will also ping @jkoshy

This revision is now accepted and ready to land.Jul 17 2024, 7:18 PM

Note that this was the only calloc instance in all of elftc that GCC warned about. All the others (even in this file) were already consistent with the number being first.

Hmm, I've been avoiding addressing warnings in contrib...

It's fine in elftoolchain - we are the primary consumer and either jkoshy or I can make the change upstream.