-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9x12UACgkQrlYvE4MpobOt9QCgoEHqgcE0qRNMtypmatkTJKfw V7EAnRdqxmbYcP4r0+LgEomYqXFD1Idi =Pzuu -----END PGP SIGNATURE-----
>From 52560c32b95dfd48e85f63f0d703f1cb2409751a Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> Date: Mon, 23 Jan 2012 15:41:11 +0000 Subject: [PATCH 18/73] libselinux: Remove jump over variable declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit seusers.c: In function â??getseuserâ??: seusers.c:273:3: error: jump skips variable initialization [-Werror=jump-misses-init] seusers.c:317:2: note: label â??errâ?? defined here seusers.c:274:8: note: â??fpâ?? declared here * seusers.c: Declare FILE *fp at start of getseuser() method Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- libselinux/src/seusers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/src/seusers.c b/libselinux/src/seusers.c index b653cad..5cdf6c0 100644 --- a/libselinux/src/seusers.c +++ b/libselinux/src/seusers.c @@ -269,9 +269,10 @@ int getseuser(const char *username, const char *service, size_t lineno = 0; char *rec = NULL; char *path=NULL; + FILE *fp = NULL; if (asprintf(&path,"%s/logins/%s", selinux_policy_root(), username) < 0) goto err; - FILE *fp = fopen(path, "r"); + fp = fopen(path, "r"); free(path); if (fp == NULL) goto err; __fsetlocking(fp, FSETLOCKING_BYCALLER); -- 1.7.9.3