Matthew DeVore has uploaded this change for review.
Fix incorrect format specifier in LogCrit
In the process of trying to build FSAL_PROXY_V3 with Clang, I ran into
a compiler error about an incorrect format specifier.
In the process of passing uint16_t types through the tertiary operator,
they are converted to a 32-bit type. For demonstration, the output of
this is 4:
int main(int argc, char **argv)
{
uint16_t x,y;
printf("%zu\n", sizeof(rand() % 1 ? x : y));
}
In practice this does not cause problems once compiled, since integer
types are promoted to at least int size when passed to varargs, but the
use of PRIu16 is a little awkward anyway, so it's worth changing.
This could be solved by casting the tertiary operator to uint16_t, but I
switched to the 'unsigned' type for readability.
Change-Id: Ibe59e7e4025a7ccd9a944b487f484e2438273d3f
Signed-off-by: Matthew DeVore <matvore@google.com>
---
M src/FSAL/FSAL_PROXY_V3/rpc.c
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/66/527066/1
To view, visit change 527066. To unsubscribe, or for help writing mail filters, visit settings.