svn commit: r246880 - in head: lib/libsm libexec/mail.local libexec/smrsh share/mk usr.bin/vacation usr.sbin/sendmail
Γιώργος Κεραμίδας
keramida at ceid.upatras.gr
Tue Apr 16 04:20:05 UTC 2013
On Sat, 16 Feb 2013 20:17:31 +0000 (UTC), Dimitry Andric <dim at FreeBSD.org> wrote:
> Author: dim
> Date: Sat Feb 16 20:17:31 2013
> New Revision: 246880
> URL: http://svnweb.freebsd.org/changeset/base/246880
>
> Log:
> Since clang 3.2 now has an option to suppress warnings about implicitly
> promoted K&R parameters, remove the workarounds added for sendmail
> components in r228558.
>
> MFC after: 1 week
> Modified: head/usr.sbin/sendmail/Makefile
> ==============================================================================
> --- head/usr.sbin/sendmail/Makefile Sat Feb 16 19:11:57 2013 (r246879)
> +++ head/usr.sbin/sendmail/Makefile Sat Feb 16 20:17:31 2013 (r246880)
> @@ -45,11 +45,6 @@ CFLAGS+= -DNETINET6
>
> WARNS?= 1
>
> -# Unfortunately, clang gives warnings about sendmail code that cannot
> -# be turned off yet. Since this is contrib code, and we don't really
> -# care about the warnings, just make them non-fatal for now.
> -NO_WERROR.clang=
> -
> DPADD= ${LIBUTIL} ${LIBWRAP}
> LDADD= -lutil -lwrap
The part of the commit that removes NO_WERROR.clang for usr.sbin/sendmail/
breaks the build of Sendmail with -DSASL. I just tried rebuilding Sendmail
with the following in "/etc/make.conf":
# Build Sendmail with SASL support.
SENDMAIL_CFLAGS ?= -I/usr/local/include -DSASL=20126
SENDMAIL_LDFLAGS ?= -L/usr/local/lib
SENDMAIL_LDADD ?= -lsasl2
The warnings that usersmtp.c still triggers when -DSASL is used are:
: cc -O2 -pipe -I/usr/src/usr.sbin/sendmail/../../contrib/sendmail/src -I/usr/src/usr.sbin/sendmail/../../contrib/sendmail/include -I. -DNEWDB -DNIS -DTCPWRAPPERS -DMAP_REGEX -DDNSMAP -DNETINET6 -DSTARTTLS -D_FFR_TLS_1 -I/usr/local/include -DSASL=20126 -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c
: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1797:50: warning: incompatible pointer types passing 'void ()' to parameter of type 'void (*)(char *, bool, MAILER *, struct
: mailer_con_info *, ENVELOPE *)' [-Wincompatible-pointer-types]
: smtpresult = reply(m, mci, e, TimeOuts.to_auth, getsasldata, NULL,
: ^~~~~~~~~~~
: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:2519:67: note: passing argument to parameter here
: extern int reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
: ^
: /usr/include/sys/cdefs.h:136:21: note: expanded from macro '__P'
: #define __P(protos) protos /* full-blown ANSI C */
: ^
: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1842:9: warning: incompatible pointer types passing 'void ()' to parameter of type 'void (*)(char *, bool, MAILER *, struct
: mailer_con_info *, ENVELOPE *)' [-Wincompatible-pointer-types]
: getsasldata, NULL, XS_AUTH);
: ^~~~~~~~~~~
: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:2519:67: note: passing argument to parameter here
: extern int reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
: ^
: /usr/include/sys/cdefs.h:136:21: note: expanded from macro '__P'
: #define __P(protos) protos /* full-blown ANSI C */
: ^
: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8: warning: incompatible pointer types passing 'void ()' to parameter of type 'void (*)(char *, bool, MAILER *, struct
: mailer_con_info *, ENVELOPE *)' [-Wincompatible-pointer-types]
: getsasldata, NULL, XS_AUTH);
: ^~~~~~~~~~~
: /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:2519:67: note: passing argument to parameter here
: extern int reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
: ^
: /usr/include/sys/cdefs.h:136:21: note: expanded from macro '__P'
: #define __P(protos) protos /* full-blown ANSI C */
: ^
: 3 warnings generated.
We have to either fix the warnings in the contrib/sendmail/src/usersmtp.c
code or put back NO_WERROR.clang, at least for usr.sbin/sendmail/Makefile.
More information about the svn-src-all
mailing list