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)
Mon, May 11, 3:29 PM
Unknown Object (File)
Mon, May 11, 2:50 PM
Unknown Object (File)
Mon, May 11, 10:59 AM
Unknown Object (File)
Sun, May 10, 2:05 PM
Unknown Object (File)
Sun, May 10, 4:43 AM
Unknown Object (File)
Fri, May 8, 7:23 PM
Unknown Object (File)
Fri, May 1, 10:18 PM
Unknown Object (File)
Mon, Apr 27, 9:24 PM
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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #28709)

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 ↗(On Diff #28709)

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 ↗(On Diff #28709)

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.