[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8987) Dirty compile without -Wall and friends
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8987) Dirty compile without -Wall and friends
- From: hyc@symas.com
- Date: Sun, 10 Mar 2019 14:48:38 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
noloader@gmail.com wrote:
> Full_Name: JW
> Version: 2.4.47
> OS: Linux (Fedora 29, x86_64, fully patched)
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (151.196.22.177)
>=20
>=20
> I'm building OpenLDAP 2.4.47 from sources on Fedora 29, x86_64. These l=
ook like
> a valid complaints:
All of these are already fixed in git. Most as part of ITS#8890, some fro=
m
other commits.
>=20
> cc -g2 -O2 -fsanitize=3Dundefined -march=3Dnative -fPIC -I../../../inc=
lude
> -I../../../include -I.. -I./.. -I/usr/local/include -DNDEBUG -c ldif.c =
-o
> ldif.o
> bconfig.c: In function =E2=80=98config_rename_one=E2=80=99:
> bconfig.c:4487:38: warning: passing argument 3 of =E2=80=98ldap_bv2rdn=E2=
=80=99 from
> incompatible pointer type [-Wincompatible-pointer-types]
> rc =3D ldap_bv2rdn( &e->e_name, &rDN, &text, LDAP_DN_FORMAT_LDAP );
> ^~~~~
> In file included from ../../include/portable.h:1171,
> from bconfig.c:21:
> ../../include/ldap.h:1711:9: note: expected =E2=80=98char **=E2=80=99 b=
ut argument is of type
> =E2=80=98const char **=E2=80=99
> char **next,
> ~~~~~~~^~~~
> ../../include/ldap_cdefs.h:32:25: note: in definition of macro =E2=80=98=
LDAP_P=E2=80=99
> # define LDAP_P(protos) protos
> ^~~~~~
>=20
>=20
>=20
> bconfig.c: In function =E2=80=98config_build_entry=E2=80=99:
> bconfig.c:6505:31: warning: passing argument 3 of =E2=80=98ldap_bv2rdn=E2=
=80=99 from
> incompatible pointer type [-Wincompatible-pointer-types]
> rc =3D ldap_bv2rdn( rdn, &rDN, &text, LDAP_DN_FORMAT_LDAP );
> ^~~~~
> In file included from ../../include/portable.h:1171,
> from bconfig.c:21:
> ../../include/ldap.h:1711:9: note: expected =E2=80=98char **=E2=80=99 b=
ut argument is of type
> =E2=80=98const char **=E2=80=99
> char **next,
> ~~~~~~~^~~~
> ../../include/ldap_cdefs.h:32:25: note: in definition of macro =E2=80=98=
LDAP_P=E2=80=99
> # define LDAP_P(protos) protos
> ^~~~~~
>=20
>=20
> cc -g2 -O2 -fsanitize=3Dundefined -march=3Dnative -fPIC -I../../include=
-I.
> -I./slapi -I. -I../../include -I/usr/local/include -DNDEBUG -c -o
> backends.o backends.c
> backend.c: In function =E2=80=98fe_acl_group=E2=80=99:
> backend.c:1503:56: warning: comparison between pointer and zero charact=
er
> constant [-Wpointer-compare]
> if ( ludp->lud_filter !=3D NULL && ludp->lud_filter !=3D '\0') {
> ^~
> backend.c:1503:39: note: did you mean to dereference the pointer?
> if ( ludp->lud_filter !=3D NULL && ludp->lud_filter !=3D '\0') {
> ^
>=20
>=20
> cc -g2 -O2 -fsanitize=3Dundefined -march=3Dnative -fPIC -I../../../inc=
lude
> -I../../../include -I.. -I./.. -I. -I./../back-bdb -I/usr/local/include=
-DNDEBUG
> -c tools.c -o tools.o
> In file included from ../../../include/portable.h:1171,
> from init.c:17:
> init.c: In function 'hdb_db_open':
> ../back-bdb/proto-bdb.h:22:35: warning: passing argument 2 of
> 'db->bdi_db->set_dup_compare' from incompatible pointer type
> [-Wincompatible-pointer-types]
> #define BDB_SYMBOL(x) LDAP_CONCAT(hdb_,x)
> ^~~~
>=20
>=20
>=20
> syntax.c: In function =E2=80=98syn_add=E2=80=99:
> syntax.c:222:33: warning: comparison between pointer and zero character=
constant
> [-Wpointer-compare]
> if ( (*lsei)->lsei_values[0] =3D=3D '\0'
> ^~
> syntax.c:222:9: note: did you mean to dereference the pointer?
> if ( (*lsei)->lsei_values[0] =3D=3D '\0'
> ^
> syntax.c:223:32: warning: comparison between pointer and zero character=
constant
> [-Wpointer-compare]
> || (*lsei)->lsei_values[1] !=3D '\0' )
> ^~
> syntax.c:223:8: note: did you mean to dereference the pointer?
> || (*lsei)->lsei_values[1] !=3D '\0' )
> ^
>=20
>=20
>=20
> cc -g2 -O2 -fsanitize=3Dundefined -march=3Dnative -fPIC -I../../include
> -I../../include -I/usr/local/include -DNDEBUG -c -o slapd-addel.o
> slapd-addel.c
> slapd-addel.c: In function =E2=80=98main=E2=80=99:
> slapd-addel.c:176:36: warning: comparison between pointer and zero char=
acter
> constant [-Wpointer-compare]
> if (( attrs =3D=3D NULL ) || ( *attrs =3D=3D '\0' )) {
> ^~
>=20
>=20
>=20
>=20
--=20
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/