From: Zdenek Kabelac Date: Sun, 30 Oct 2011 22:52:08 +0000 (+0000) Subject: Thin fix compile warns X-Git-Tag: v2_02_91~330 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=25de9addb687122236b7850b1e094b96ebea572c;p=lvm2.git Thin fix compile warns Test for dm_snprintf < 0. Add header for moved backup. --- 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; }