Fix clang warnings when compiling on FreeBSD #1

wants to merge 2 commits into


None yet

2 participants


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 <>
@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 <>
illumos member

I know we're weird, but it'd help a bunch if you'd follow:

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

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