[gvfs/wip/inigomartinez/meson] dav: Prevent usage of uninitialized variable



commit 7aee8a0bca47570f2e522f69efe1afcc9fcdfbe8
Author: Ondrej Holy <oholy redhat com>
Date:   Thu Sep 21 19:35:14 2017 +0200

    dav: Prevent usage of uninitialized variable
    
    More warnings are printed when building thanks to meson     port. The bytes_avail
    variable is guarded by have_bytes_avail, so it should not be used unitialized,
    but let's initialize it for sure in order to prevent the following warning:
    warning: ‘bytes_avail’ may be used uninitialized in this function
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786149

 daemon/gvfsbackenddav.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 7ff7b91..53bebe3 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -1156,6 +1156,7 @@ ms_response_to_fs_info (MsResponse *response,
   gboolean    have_bytes_avail;
   gboolean    have_bytes_used;
 
+  bytes_avail = bytes_used = 0;
   have_bytes_avail = have_bytes_used = FALSE;
 
   ms_response_get_propstat_iter (response, &iter);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]