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

(ITS#8987) Dirty compile without -Wall and friends



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)


I'm building OpenLDAP 2.4.47 from sources on Fedora 29, x86_64. These look like
a valid complaints:


 cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../../include
-I../../../include -I.. -I./.. -I/usr/local/include -DNDEBUG -c ldif.c -o
ldif.o
bconfig.c: In function ?config_rename_one?:
bconfig.c:4487:38: warning: passing argument 3 of ?ldap_bv2rdn? from
incompatible pointer type [-Wincompatible-pointer-types]
  rc = 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 ?char **? but argument is of type
?const char **?
  char **next,
  ~~~~~~~^~~~
../../include/ldap_cdefs.h:32:25: note: in definition of macro ?LDAP_P?
 # define LDAP_P(protos) protos
                         ^~~~~~



bconfig.c: In function ?config_build_entry?:
bconfig.c:6505:31: warning: passing argument 3 of ?ldap_bv2rdn? from
incompatible pointer type [-Wincompatible-pointer-types]
  rc = 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 ?char **? but argument is of type
?const char **?
  char **next,
  ~~~~~~~^~~~
../../include/ldap_cdefs.h:32:25: note: in definition of macro ?LDAP_P?
 # define LDAP_P(protos) protos
                         ^~~~~~


cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../include -I.
-I./slapi -I. -I../../include   -I/usr/local/include -DNDEBUG     -c -o
backends.o backends.c
backend.c: In function ?fe_acl_group?:
backend.c:1503:56: warning: comparison between pointer and zero character
constant [-Wpointer-compare]
      if ( ludp->lud_filter != NULL && ludp->lud_filter != '\0') {
                                                        ^~
backend.c:1503:39: note: did you mean to dereference the pointer?
      if ( ludp->lud_filter != NULL && ludp->lud_filter != '\0') {
                                       ^


 cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../../include
-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)
                                   ^~~~



syntax.c: In function ?syn_add?:
syntax.c:222:33: warning: comparison between pointer and zero character constant
[-Wpointer-compare]
    if ( (*lsei)->lsei_values[0] == '\0'
                                 ^~
syntax.c:222:9: note: did you mean to dereference the pointer?
    if ( (*lsei)->lsei_values[0] == '\0'
         ^
syntax.c:223:32: warning: comparison between pointer and zero character constant
[-Wpointer-compare]
     || (*lsei)->lsei_values[1] != '\0' )
                                ^~
syntax.c:223:8: note: did you mean to dereference the pointer?
     || (*lsei)->lsei_values[1] != '\0' )
        ^



cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../include
-I../../include   -I/usr/local/include -DNDEBUG     -c -o slapd-addel.o
slapd-addel.c
slapd-addel.c: In function ?main?:
slapd-addel.c:176:36: warning: comparison between pointer and zero character
constant [-Wpointer-compare]
  if (( attrs == NULL ) || ( *attrs == '\0' )) {
                                    ^~