[SSSD] Unpleasant warnings

Simo Sorce ssorce at redhat.com
Tue Sep 8 18:36:49 UTC 2009


On Tue, 2009-09-08 at 12:21 +0200, Sumit Bose wrote:
> > ../../server/responder/nss/nsssrv_cmd.c: In function ‘fill_grent’:
> > ../../server/responder/nss/nsssrv_cmd.c:1371: warning: ‘i’ may be
> used
> > uninitialized in this function
> 
> The value of count might have an unexpected value, but in this case
> fill_grent will return an error, too.

Yet this is bad, as the function is supposed to always return how many
entries have been used, even in case of errors.

Attached a patch to fix this, that makes it explicit.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-counter-for-used-messages-explicit.patch
Type: text/x-patch
Size: 1511 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20090908/ee843441/attachment.bin>


More information about the sssd-devel mailing list