Fix clang warnings when compiling on FreeBSD #1

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@yaneurabeya

These items were found when compiling zpool(8) on FreeBSD with clang.

They have not been compile-tested as I don't have a copy of OpenSolaris available at my disposal, but the changes are very mechanical/trivial.

yaneurabeya added some commits Nov 12, 2012
@yaneurabeya yaneurabeya Fix clang compiler warning on FreeBSD
The parentheses around assignment of zhp are potentially ambiguous in
the conditional test when iterating over zpools.

This makes the return value tested explicit and adds needed parentheses
to fix a clang/newer gcc compiler warning.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
70cf8a9
@yaneurabeya yaneurabeya Fix -Wformat clang compile time warnings
The current printf(3) format qualifiers are signed or not exactly
equivalent to the values provided as parameters in the printf(3) calls.

All printf(3) calls have been properly standardized on u_longlong_t to
match the surrounding code.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
dbf3d8f
@richlowe
illumos member

I know we're weird, but it'd help a bunch if you'd follow: http://wiki.illumos.org/display/illumos/How+To+Contribute

Though while I'm here, you're using the BSD-ish type in dbf3d8f where we generally wouldn't (u_longlong_t in place of uint64_t I imagine).

@richlowe richlowe closed this Nov 12, 2012
@yaneurabeya

Ok. I couldn't [quickly] find a way where one could disable pull requests, but doing that and providing a pointer to the docs would be ideal compared to having to manually do this all the time.

With respect to the the type, I matched the surrounding code by choosing u_longlong_t; [Free]BSD prefers strict types as well (uint32_t, int64_t, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment