From 73fd329cbdd8bce07572f40becf8a51eeaf29790 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 14 May 2009 00:10:59 +0000 Subject: [PATCH] - Add the proper __opal_attribute_format__(__printf__...) to declarations. This commit was SVN r21226. --- ompi/mca/btl/base/btl_base_error.h | 4 ++-- opal/util/output.h | 4 ++-- orte/mca/errmgr/errmgr.h | 2 +- orte/mca/notifier/base/notifier_base_open.c | 4 ++-- orte/mca/notifier/notifier.h | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ompi/mca/btl/base/btl_base_error.h b/ompi/mca/btl/base/btl_base_error.h index 903f3b9a30..6c778aa709 100644 --- a/ompi/mca/btl/base/btl_base_error.h +++ b/ompi/mca/btl/base/btl_base_error.h @@ -32,8 +32,8 @@ OMPI_DECLSPEC extern int mca_btl_base_verbose; -OMPI_DECLSPEC extern int mca_btl_base_err(const char*, ...); -OMPI_DECLSPEC extern int mca_btl_base_out(const char*, ...); +OMPI_DECLSPEC extern int mca_btl_base_err(const char*, ...) __opal_attribute_format__(__printf__, 1, 2); +OMPI_DECLSPEC extern int mca_btl_base_out(const char*, ...) __opal_attribute_format__(__printf__, 1, 2); #define BTL_OUTPUT(args) \ do { \ diff --git a/opal/util/output.h b/opal/util/output.h index 22a2e03084..39b348bb43 100644 --- a/opal/util/output.h +++ b/opal/util/output.h @@ -399,7 +399,7 @@ struct opal_output_stream_t { * Same as opal_output_verbose(), but takes a va_list form of varargs. */ OPAL_DECLSPEC void opal_output_vverbose(int verbose_level, int output_id, - const char *format, va_list ap); + const char *format, va_list ap) __opal_attribute_format__(__printf__, 3, 0); /** * Send output to a string if the verbosity level is high enough. @@ -422,7 +422,7 @@ struct opal_output_stream_t { * Same as opal_output_string, but accepts a va_list form of varargs. */ OPAL_DECLSPEC char *opal_output_vstring(int verbose_level, int output_id, - const char *format, va_list ap); + const char *format, va_list ap) __opal_attribute_format__(__printf__, 3, 0); /** * Set the verbosity level for a stream. diff --git a/orte/mca/errmgr/errmgr.h b/orte/mca/errmgr/errmgr.h index 4ce3d3cf10..445dc9f229 100644 --- a/orte/mca/errmgr/errmgr.h +++ b/orte/mca/errmgr/errmgr.h @@ -130,7 +130,7 @@ typedef int (*orte_errmgr_base_module_register_cb_fn_t)(orte_jobid_t job, * itself, and then exit - it takes no other actions. The intent here is to provide * a last-ditch exit procedure that attempts to clean up a little. */ -typedef void (*orte_errmgr_base_module_abort_fn_t)(int error_code, char *fmt, ...) __opal_attribute_noreturn__; +typedef void (*orte_errmgr_base_module_abort_fn_t)(int error_code, char *fmt, ...) __opal_attribute_noreturn__ __opal_attribute_format__(__printf__, 2, 3); /* * diff --git a/orte/mca/notifier/base/notifier_base_open.c b/orte/mca/notifier/base/notifier_base_open.c index 3293478a74..a1b5bd2e89 100644 --- a/orte/mca/notifier/base/notifier_base_open.c +++ b/orte/mca/notifier/base/notifier_base_open.c @@ -38,9 +38,9 @@ #include "orte/mca/notifier/base/static-components.h" -static void orte_base_log(int severity, int errcode, const char *msg, ...); +static void orte_base_log(int severity, int errcode, const char *msg, ...) __opal_attribute_format__(__printf__, 3, 4); static void orte_log_show_help(int severity, int errcode, const char *file, const char *topic, ...); -static void orte_log_peer(int severity, int errcode, orte_process_name_t *peer_proc, const char *msg, ...); +static void orte_log_peer(int severity, int errcode, orte_process_name_t *peer_proc, const char *msg, ...) __opal_attribute_format__(__printf__, 4, 5); /* * Global variables diff --git a/orte/mca/notifier/notifier.h b/orte/mca/notifier/notifier.h index 839eb99f19..f7182c45fd 100644 --- a/orte/mca/notifier/notifier.h +++ b/orte/mca/notifier/notifier.h @@ -70,13 +70,13 @@ typedef int (*orte_notifier_base_module_init_fn_t)(void); typedef void (*orte_notifier_base_module_finalize_fn_t)(void); /* Log a failure message */ -typedef void (*orte_notifier_base_module_log_fn_t)(int severity, int errcode, const char *msg, ...); +typedef void (*orte_notifier_base_module_log_fn_t)(int severity, int errcode, const char *msg, ...) __opal_attribute_format__(__printf__, 3, 4); /* Log a failure that is based upon a show_help message */ typedef void (*orte_notifier_base_module_log_show_help_fn_t)(int severity, int errcode, const char *file, const char *topic, ...); /* Log a failure related to a peer */ -typedef void (*orte_notifier_base_module_log_peer_fn_t)(int severity, int errcode, orte_process_name_t *peer_proc, const char *msg, ...); +typedef void (*orte_notifier_base_module_log_peer_fn_t)(int severity, int errcode, orte_process_name_t *peer_proc, const char *msg, ...) __opal_attribute_format__(__printf__, 4, 5); /* * Ver 1.0