ehlo,

simple patch is attached.

LS
>From 7397a9d4498716c32721c0baa466d4e2eaaf3aee Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Wed, 11 May 2016 15:03:42 +0200
Subject: [PATCH] TOOLS: Fix warning maybe-uninitialized
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

src/tools/files.c: In function ‘copy_file_contents’:
src/tools/files.c:413:12: error: ‘ret’ may be used uninitialized in this
     function [-Werror=maybe-uninitialized]
     return ret;
            ^~~
---
 src/tools/files.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/tools/files.c b/src/tools/files.c
index 
012205f9e7b0dac60c2470ac67ff3f12bb45d3c0..5364f5c0dd53aad71452e18b8d7f1f04532132a4
 100644
--- a/src/tools/files.c
+++ b/src/tools/files.c
@@ -381,6 +381,7 @@ copy_file_contents(int ifd,
         }
 
         if (written != cnt) {
+            ret = EINVAL;
             DEBUG(SSSDBG_CRIT_FAILURE,
                   "Wrote %zd bytes, expected %zd\n", written, cnt);
             goto done;
-- 
2.7.4

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org

Reply via email to