[SSSD] [PATCH] Silence warnings with -O2

Jakub Hrozek jhrozek at redhat.com
Tue Apr 27 12:10:20 UTC 2010


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

On 04/27/2010 01:19 PM, Stephen Gallagher wrote:
> On 04/27/2010 05:25 AM, Jakub Hrozek wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I noticed there were some warnings when compiling with the default
>> Fedora CFLAGS.
> 
> 
> I don't see any warnings when building on Fedora 13 with the default 
> CFLAGS. Could you please identify the warnings you're trying to fix>
> 

I get these on F12, x86_64 (CFLAGS and configure switches as returned by
rpm -E '%configure'):

- ---
providers/ldap/sdap_async_accounts.c: In function ‘sdap_save_user’:
providers/ldap/sdap_async_accounts.c:40: warning: ‘name’ may be used
uninitialized in this function
providers/proxy.c: In function ‘get_pw_uid’:
providers/proxy.c:417: warning: ‘status’ may be used uninitialized in
this function
providers/proxy.c: In function ‘get_gr_name’:
providers/proxy.c:672: warning: ‘status’ may be used uninitialized in
this function
providers/proxy.c: In function ‘get_gr_gid’:
providers/proxy.c:820: warning: ‘status’ may be used uninitialized in
this function
providers/ldap/sdap_async_accounts.c: In function ‘sdap_save_user’:
providers/ldap/sdap_async_accounts.c:40: warning: ‘name’ may be used
uninitialized in this function
tools/sss_sync_ops.c: In function ‘groupmod’:
tools/sss_sync_ops.c:262: warning: ‘member_dn’ may be used uninitialized
in this function
tools/sss_sync_ops.c: In function ‘usermod’:
tools/sss_sync_ops.c:202: warning: ‘member_dn’ may be used uninitialized
in this function
tools/sss_sync_ops.c:201: warning: ‘attrs’ may be used uninitialized in
this function
- ---

I think the ones in sss_sync_ops are spurious, but the others are legit.

> Also, you're changing functionality here. For example, in 
> sdap_save_user(), by removing the 'goto fail' lines, we will no longer 
> print a DEBUG message on failure.
> 

Ah, correct, especially in the sdap_save_user() case it would be confusing.

A new patch is attached.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkvW1CwACgkQHsardTLnvCXEFwCfaUOwrWI1+8WJwGC67QKbxECz
xF8AniLpdjlZL+a/b/zYBlTRwvozsAcq
=l0kk
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Silence-warnings-with-O2.patch
Type: text/x-patch
Size: 4041 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100427/80875035/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Silence-warnings-with-O2.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100427/80875035/attachment.sig>


More information about the sssd-devel mailing list