[Pkg-libvirt-commits] [libguestfs] 208/233: fish/uri: Initialize some variables to avoid a warning.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:12:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit cd9f7411741290add87910d531a9cd8685b3be91
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Feb 13 13:37:55 2014 +0000
fish/uri: Initialize some variables to avoid a warning.
The warning only appears when we set CFLAGS to be the same as used by
RPM, which you can do by setting:
CFLAGS="$(rpm --eval '%{__global_cflags}')"
before running ./configure.
FWIW the current value of that RPM expression (in Fedora 20) is:
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
It is not clear which option precisely enables the warning.
---
fish/uri.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/fish/uri.c b/fish/uri.c
index 972eada..95f8cf8 100644
--- a/fish/uri.c
+++ b/fish/uri.c
@@ -41,10 +41,10 @@ static int make_server (xmlURIPtr uri, const char *socket, char ***ret);
int
parse_uri (const char *arg, struct uri *uri_ret)
{
- char *path;
- char *protocol;
- char **server;
- char *username;
+ char *path = NULL;
+ char *protocol = NULL;
+ char **server = NULL;
+ char *username = NULL;
/* Does it look like a URI? */
if (is_uri (arg)) {
@@ -64,8 +64,6 @@ parse_uri (const char *arg, struct uri *uri_ret)
free (path);
return -1;
}
- server = NULL;
- username = NULL;
}
uri_ret->path = path;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list