Skip to contentSkip to conversation

uninitialized variables in the 5.4 release

PATCH Lars Müller 3 participants 4 messages Apr 19, 2012 – Apr 20, 2012 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

older gcc versions (4.3 in the case of SUSE Linux Enterprise 11 SP 1 and SP 2) complain about uninitialized variables in the recent 5.4 release.

The attached patch makes the build process a bit quieter.

Cheers,

Lars

Signature · 3 lines
Lars Müller [ˈlaː(r)z ˈmʏlɐ]
Samba Team + SUSE Labs
SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany

Author: Lars Mueller <lmuelle-IBi9RG/[email protected]>
Subject: cifs-utils build warns bkupuid and bkupgid may be used uninitialized
Bugzilla: na

mount.cifs.c +2 -2
Index: cifs-utils-5.4/mount.cifs.c
===================================================================
@@ -863,8 +863,8 @@ parse_options(const char *data, struct p
 	int got_uid = 0;
 	int got_cruid = 0;
 	int got_gid = 0;
-	uid_t uid, cruid = 0, bkupuid;
-	gid_t gid, bkupgid;
+	uid_t uid, cruid = 0, bkupuid = 0;
+	gid_t gid, bkupgid = 0;
 	char *ep;
 	struct passwd *pw;
 	struct group *gr;

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · On Thu, 19 Apr 2012 19:52:42 +0200 Lars Müller <[email protected]> wrote:

Hi,

older gcc versions (4.3 in the case of SUSE Linux Enterprise 11 SP 1 and SP 2) complain about uninitialized variables in the recent 5.4 release.

The attached patch makes the build process a bit quieter.

Cheers,

Lars

Looks reasonable if it silences the compiler warnings on older gcc, even if it's not really a bug per-se. I do wonder if there's some annotation you can add to silence that warning, but it's probably not worth worrying about.

I'll commit it in the next few days if no one objects...
- --
Jeff Layton <[email protected]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIcBAEBAgAGBQJPkFMIAAoJEAAOaEEZVoIVY7UP/jLd8GkmBaLHctZnT8Ez4+tT RMNdI44fih+NC395ZNr5eCTW76XgH2AiPtPkmQsv7nkkagopCcBFYlKPmTYG7YOj xaxmFmQbud/1QHD0vLSuhqYCMemmGN5LUrYEeEDXu69m5F3+CxwE7FMZXdQpTS+u nv8x3nzAaqJFhV6nSvWxMDVLbz0GCysNjMPb7FN6zm7rED1vy4tUV4RnQdGKcRJw WOpndRInkZCcdXfNCWSaOPrS9zjuvlChLrgYVJd1rg0SAW5e9+NtEByIpKFuSKDX hMbudlHq6X9k+ryeb2ljsO0I/6LdZ3/gbxlhVZ70tPk8NJ/rqWfofu/JcsR4tR9O 0f7N73IaM7sazmpBdjmlM2qspLlWjyQb4HJObBgnbHVuItIJrYraEklqFHCiUDoy XZFR9fzSCl9PAXHTlbJbtXF7Uc9j72gfnCcteYm2sNMWzPqLbGPBZ/i61XCzP8Hm TTUyp57djM6NCKS91bNAHuYli8TkNK9tj7PMmV25bKK9WvkctfW3/D2OG7zaf/1e w0uRO6z0uAJGW5uDfJZD2hSwvfpZI6Yu4NMx3JIusvULUCy4n7eaT62+Vtl0veUU EGRPDFhuGbO6qLa/Yh7SSRzXMHOOfo3XcuQ/tFWWr7BcP6RWiz8H2bwKWlow9prU NU6utu3iZXQmFLMpQfhk
=hroJ
-----END PGP SIGNATURE-----

A message that is not in the archive (sent off-list or not yet received): 20120419140144.7b435b50-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org

#4 lore raw
Quoted 13 lines · Jeff Layton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · On Thu, 19 Apr 2012 19:52:42 +0200 Lars Müller…

Hi,

older gcc versions (4.3 in the case of SUSE Linux Enterprise 11 SP 1 and SP 2) complain about uninitialized variables in the recent 5.4 release.

The attached patch makes the build process a bit quieter.

Quoted 8 lines
Quoted 3 lines

Cheers,

Lars

Looks reasonable if it silences the compiler warnings on older gcc, even if it's not really a bug per-se. I do wonder if there's some annotation you can add to silence that warning, but it's probably not worth worrying about.

Yes, annotation is perhaps not worth it. This patch and the other build fixes from Lars looks good to me.

Quoted 1 line

I'll commit it in the next few days if no one objects...

#5 lore raw
In reply to a message not in the archive
Quoted 10 lines · On Thu, 19 Apr 2012 19:52:42 +0200 Lars Müller…

Hi,

older gcc versions (4.3 in the case of SUSE Linux Enterprise 11 SP 1 and SP 2) complain about uninitialized variables in the recent 5.4 release.

The attached patch makes the build process a bit quieter.

Cheers,

Lars

All 3 of Lars' patches are now merged.

Signature · 1 line
Jeff Layton <[email protected]>