Page MenuHomeFreeBSD

Clean up compiler warnings in sysctl(8)
Needs ReviewPublic

Authored by trasz on Tue, Mar 24, 12:58 PM.

Details

Reviewers
cem
Summary

Clean up compiler warnings in sysctl(8).

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 30119
Build 27926: arc lint + arc unit

Event Timeline

trasz created this revision.Tue, Mar 24, 12:58 PM
trasz updated this revision to Diff 69840.Tue, Mar 24, 7:59 PM

Fix MIPS.

trasz added a comment.Wed, Mar 25, 4:14 PM

(Tinderboxed.)

trasz updated this revision to Diff 69899.Thu, Mar 26, 6:50 PM

Pacify gcc, just in case.

trasz added a reviewer: cem.Mon, Mar 30, 9:46 PM
cem added a comment.Mon, Mar 30, 10:07 PM

Mostly LGTM, thanks.

sbin/sysctl/sysctl.c
738

The second (struct efi_md *) cast can be dropped. It is redundant.

907

Alternatively, just memcpy(kind, buf, sizeof(*kind)); here and drop the other changes to this function.

sys/sys/efi.h
96

The second struct efi_md * cast is redundant here as well, unless something is directly acting on this macro like: efi_next_descriptor(...)->md_phys. Which, I hope not.

imp added inline comments.Mon, Mar 30, 10:57 PM
sbin/sysctl/sysctl.c
940

Is this still needed?