-
- Downloads
bsd/xdr: Silence uninitialized use warnings with -O3
Gcc comaplins about attempt to read 'size' via dereferencing a pointer in xdr_u_int() in case xdrs->x_op == XDR_ENCODE. However, in this case the size will be set from the switch case inside xdr_string() before xdr_u_int() is invoked. I think it's spurious because the code clearly assumes that xdrs->x_op cannot change between these two execution points. Let's initialize 'size' to 0 to make gcc happy. Signed-off-by:Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Please register or sign in to comment