Clang complains:
systemd_stubs.c:51:8: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
ret = Val_int(-1U);
^~~~~~~~~~~~
Since sd_notify_fd has a signature of unit -> unit, we simply change
the return value to Val_unit.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
CAMLprim value ocaml_sd_notify_ready(value ignore)
{
CAMLparam1(ignore);
- CAMLlocal1(ret);
-
- ret = Val_int(0);
sd_notify(1, "READY=1");
- CAMLreturn(ret);
+ CAMLreturn(Val_unit);
}
#else
CAMLprim value ocaml_sd_notify_ready(value ignore)
{
CAMLparam1(ignore);
- CAMLlocal1(ret);
-
- ret = Val_int(-1U);
- CAMLreturn(ret);
+ CAMLreturn(Val_unit);
}
#endif