[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/2] ocaml: remove undefined behaviour in systemd_stubs.c
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. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- Cc: Christian Lindig <christian.lindig@xxxxxxxxxx> Cc: David Scott <dave@xxxxxxxxxx> See: https://gitlab.com/liuw/xen/-/jobs/83628833 --- tools/ocaml/xenstored/systemd_stubs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index 490156c06a..d1dd33c95b 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -48,7 +48,7 @@ CAMLprim value ocaml_sd_notify_ready(value ignore) CAMLparam1(ignore); CAMLlocal1(ret); - ret = Val_int(-1U); + ret = Val_int(0); CAMLreturn(ret); } -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |