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
Unknown Object (File)
Mon, Sep 23, 4:16 AM
Unknown Object (File)
Mon, Sep 16, 8:12 AM
Unknown Object (File)
Mon, Sep 16, 8:12 AM
Unknown Object (File)
Mon, Sep 16, 8:12 AM
Unknown Object (File)
Sun, Sep 8, 10:23 PM
Unknown Object (File)
Sun, Sep 8, 8:00 PM
Unknown Object (File)
Sun, Sep 8, 5:36 AM
Unknown Object (File)
Sat, Sep 7, 6:05 AM

Details

Summary

Reported by: GCC 14 -Wcalloc-transposed-args

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58689
Build 55577: arc lint + arc unit

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.