r17743: fix compiler warnings
authorStefan Metzmacher <metze@samba.org>
Wed, 23 Aug 2006 09:19:19 +0000 (09:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:16:35 +0000 (14:16 -0500)
metze
(This used to be commit 694a56b0ae0125594d6a23d8465249f011b6284e)

source4/lib/ldb/include/ldb.h
source4/lib/ldb/include/ldb_private.h

index 2e659b5307928ec6144431c8cadd92f1cae9c01e..b07cdd964ce868515548e9091f2c255ace87afad 100644 (file)
@@ -80,6 +80,12 @@ struct ldb_val {
 };
 #endif
 
+/*! \cond DOXYGEN_IGNORE */
+#ifndef PRINTF_ATTRIBUTE
+#define PRINTF_ATTRIBUTE(a,b)
+#endif
+/*! \endcond */
+
 /**
    internal ldb exploded dn structures
 */
@@ -204,7 +210,7 @@ enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR,
 */
 struct ldb_debug_ops {
        void (*debug)(void *context, enum ldb_debug_level level, 
-                     const char *fmt, va_list ap);
+                     const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0);
        void *context;
 };
 
@@ -242,12 +248,6 @@ struct ldb_utf8_fns {
 */
 #define LDB_FLG_RECONNECT 4
 
-/*! \cond DOXYGEN_IGNORE */
-#ifndef PRINTF_ATTRIBUTE
-#define PRINTF_ATTRIBUTE(a,b)
-#endif
-/*! \endcond */
-
 /*
    structures for ldb_parse_tree handling code
 */
@@ -1000,7 +1000,7 @@ int ldb_valid_attr_name(const char *s);
    \sa ldb_ldif_read for the reader equivalent to this function.
 */
 int ldb_ldif_write(struct ldb_context *ldb,
-                  int (*fprintf_fn)(void *, const char *, ...), 
+                  int (*fprintf_fn)(void *, const char *, ...) PRINTF_ATTRIBUTE(2,3)
                   void *private_data,
                   const struct ldb_ldif *ldif);
 
@@ -1329,7 +1329,7 @@ struct ldb_val ldb_val_dup(void *mem_ctx, const struct ldb_val *v);
 */
 int ldb_set_debug(struct ldb_context *ldb,
                  void (*debug)(void *context, enum ldb_debug_level level, 
-                               const char *fmt, va_list ap),
+                               const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0),
                  void *context);
 
 /**
index 754e4bc8590148fbe806e410272e35c22dfee570..d66b6f1cc73a8c3fe3aeb2e9848bd4ce2caa74ba 100644 (file)
@@ -148,7 +148,7 @@ int ldb_next_del_trans(struct ldb_module *module);
 int ldb_next_init(struct ldb_module *module);
 
 void ldb_set_errstring(struct ldb_context *ldb, const char *err_string);
-void ldb_asprintf_errstring(struct ldb_context *ldb, const char *format, ...);
+void ldb_asprintf_errstring(struct ldb_context *ldb, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
 void ldb_reset_err_string(struct ldb_context *ldb);
 
 int ldb_register_module(const struct ldb_module_ops *);