From 25de9addb687122236b7850b1e094b96ebea572c Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 30 Oct 2011 22:52:08 +0000 Subject: [PATCH] Thin fix compile warns Test for dm_snprintf < 0. Add header for moved backup. --- lib/metadata/thin_manip.c | 1 + libdm/libdm-deptree.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c index c23538a76..fdeac700f 100644 --- a/lib/metadata/thin_manip.c +++ b/lib/metadata/thin_manip.c @@ -18,6 +18,7 @@ #include "metadata.h" #include "segtype.h" #include "lv_alloc.h" +#include "archiver.h" int attach_pool_metadata_lv(struct lv_segment *seg, struct logical_volume *pool_metadata_lv) { diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 6b3a543b1..7768261ea 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1294,9 +1294,11 @@ static int _thin_pool_node_message(struct dm_tree_node *dnode, struct thin_messa m->u.m_set_transaction_id.current_id, m->u.m_set_transaction_id.new_id); break; + default: + r = -1; } - if (!r) { + if (r < 0) { log_error("Failed to prepare message."); return 0; } -- 2.43.5