Page MenuHomeFreeBSD

libthr: fix warnings from GCC when WARNS=6
ClosedPublic

Authored by vangyzen on May 23 2017, 1:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 15, 12:38 PM
Unknown Object (File)
Jul 19 2025, 3:12 AM
Unknown Object (File)
Jun 18 2025, 9:25 AM
Unknown Object (File)
Jun 12 2025, 3:06 PM
Unknown Object (File)
Jun 10 2025, 4:08 PM
Unknown Object (File)
Jun 9 2025, 12:19 PM
Unknown Object (File)
Jun 8 2025, 6:08 AM
Unknown Object (File)
Jun 7 2025, 6:21 AM
Subscribers

Details

Summary

Fix warnings about redundant declarations, a local variable shadowing
a global function (dlinfo), and an old-style function definition
(with an empty parameter list).

Test Plan

make tinderbox passes (except for a few unrelated kernel failures)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9454
Build 9906: arc lint + arc unit

Event Timeline

I added _.riscv.* to the svn:ignore property. I'll commit that separately.

kib added inline comments.
lib/libthr/thread/thr_private.h
873

Since the #if's become nested, I would consider adding comments to #endif lines.

This revision is now accepted and ready to land.May 23 2017, 1:40 PM
include/stdio.h
467

I don't particularly like this, but it follows precedent.

An alternative would move the declaration into a common header file, but I couldn't identify a good candidate, and I didn't think creating one was worth the effort.

I'm open to suggestion, of course.

lib/libthr/thread/thr_private.h
841

I don't particularly like this. It requires consumers to include libc_private.h before thr_private.h. It also adds maintenance, because additions to libc_private.h might require adjustments here. However, given the limited usage of these files, both of these requirements seem fairly reasonable.

An alternative would create a new, common header file, such as libc_thr_private.h, included by libc_private.h and thr_private.h.

I'm open to suggestion, of course.

This revision was automatically updated to reflect the committed changes.