From 7c97cc7eb26c7232ca286e5ad4322c3be2bdcfca Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 4 Oct 2019 20:02:07 +0300 Subject: [PATCH] lib/c: fix a compile time error lib/c/criu.c:343:30: error: implicit conversion from enumeration type 'enum criu_pre_dump_mode' to different enumeration type 'CriuPreDumpMode' (aka 'enum _CriuPreDumpMode') [-Werror,-Wenum-conversion opts->rpc->pre_dump_mode = mode; ~ ^~~~ Signed-off-by: Andrei Vagin --- lib/c/criu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/c/criu.c b/lib/c/criu.c index fffb9fd9c..1d0a235f4 100644 --- a/lib/c/criu.c +++ b/lib/c/criu.c @@ -340,7 +340,7 @@ int criu_local_set_pre_dump_mode(criu_opts *opts, enum criu_pre_dump_mode mode) { opts->rpc->has_pre_dump_mode = true; if (mode == CRIU_PRE_DUMP_SPLICE || mode == CRIU_PRE_DUMP_READ) { - opts->rpc->pre_dump_mode = mode; + opts->rpc->pre_dump_mode = (CriuPreDumpMode)mode; return 0; } return -1;