dovecot-2.2: Avoid a NULL warning in mysql_init() when HAVE_ATTR...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jun 24 18:58:27 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/634474af3957
changeset: 14631:634474af3957
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jun 24 18:58:19 2012 +0300
description:
Avoid a NULL warning in mysql_init() when HAVE_ATTR_NULL capable compiler is used.

diffstat:

 src/lib-sql/driver-mysql.c |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r 5a9f9c35a8f0 -r 634474af3957 src/lib-sql/driver-mysql.c
--- a/src/lib-sql/driver-mysql.c	Sun Jun 24 03:02:11 2012 +0300
+++ b/src/lib-sql/driver-mysql.c	Sun Jun 24 18:58:19 2012 +0300
@@ -10,7 +10,16 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <time.h>
+#ifdef HAVE_ATTR_NULL
+/* ugly way to tell clang that mysql.h is a system header and we don't want
+   to enable nonnull attributes for it by default.. */
+# 4 "driver-mysql.c" 3
+#endif
 #include <mysql.h>
+#ifdef HAVE_ATTR_NULL
+# 4 "driver-mysql.c" 3
+# line 20
+#endif
 #include <errmsg.h>
 
 struct mysql_db {


More information about the dovecot-cvs mailing list