[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: used unitialized (ITS#1797)



> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> kervin@blueprint-tech.com

> used "-Wall -Wno-format" in the CFLAGS
>
> Apart from the unused variables ( listed below ) there are
> variables which may
> be potentially used before initialized.
>
> ...
> getdn.c: In function `ldap_X509dn2bv':
> getdn.c:3324: warning: `oidbuf' might be used uninitialized in
> this function
> getdn.c:3326: warning: `k' might be used uninitialized in this function

Both of these are spurious warnings; k is always initialized at line 3382,
oidbuf is only used if oidsize is non-zero. oidsize is initialized to zero
and only changes if the automatic array oids[] is filled up. Anyway, for
the sake of silencing the warnings, I will init these to zero/NULL...

By the way, it would be helpful in submitting bug reports of this form to
include the parent directory name of the relevant file. It wasn't
immediately obvious that you were talking about two separate directories,
libldap/getdn.c and slapd/filter.c (as opposed to libldap/filter.c...).

> ...
> filter.c:1026: warning: `err' might be used uninitialized in this function
> ...