[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] ocaml: remove undefined behaviour in systemd_stubs.c
On Mon, Jul 23, 2018 at 10:47:04AM +0100, Andrew Cooper wrote: > On 23/07/18 10:30, Wei Liu wrote: > > Clang complains: > > > > systemd_stubs.c:51:8: error: shifting a negative signed value is undefined > > [-Werror,-Wshift-negative-value] > > ret = Val_int(-1U); > > ^~~~~~~~~~~~ > > > > Simply change the return value to 0. > > That will break the function though, as it previously returned -1. I don't think the caller cares about the return value. The function signature is unit -> unit for sd_nofity_ready, and the return value is not checked at all. I admit I could have misread the code though. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |