diff options
author | Ondrej Holy <oholy@redhat.com> | 2017-09-21 19:44:12 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2017-09-29 12:50:15 +0200 |
commit | bf6bd1d5051e6c8fdd9e9dabcdbc3160495018f5 (patch) | |
tree | 81734e4fc21509cbbdc1374bea69a67941b5d8b1 /daemon/gvfsbackenddav.c | |
parent | 91cc187e30f63c5a8ea574047a0a7769a7275b88 (diff) | |
download | gvfs-bf6bd1d5051e6c8fdd9e9dabcdbc3160495018f5.tar.gz |
dav: Prevent usage of uninitialized variable
More warnings are printed when building thanks to meson port. The mounting
loop may be breaked before is_webdav variable is defined. Let's move the
initialization to another place in order to prevent usage of uninitialized
variable and the following warning:
warning: ‘is_webdav’ may be used uninitialized in this function
https://bugzilla.gnome.org/show_bug.cgi?id=786149
Diffstat (limited to 'daemon/gvfsbackenddav.c')
-rw-r--r-- | daemon/gvfsbackenddav.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c index 53bebe30..967f1db4 100644 --- a/daemon/gvfsbackenddav.c +++ b/daemon/gvfsbackenddav.c @@ -1893,6 +1893,7 @@ do_mount (GVfsBackend *backend, res = TRUE; status = g_vfs_backend_dav_send_message (backend, msg_opts); is_success = SOUP_STATUS_IS_SUCCESSFUL (status); + is_webdav = sm_has_header (msg_opts, "DAV"); /* If SSL is used and the certificate verifies OK, then ssl-strict remains * on for all further connections. @@ -1921,8 +1922,6 @@ do_mount (GVfsBackend *backend, } } - is_webdav = sm_has_header (msg_opts, "DAV"); - if (!is_success || !is_webdav) break; |