aboutsummaryrefslogtreecommitdiffstats
path: root/epan/expert.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-09-13 04:00:47 +0000
committerGuy Harris <guy@alum.mit.edu>2005-09-13 04:00:47 +0000
commitaba53424dda64ec75b98719bab91e37f03d713c8 (patch)
treeccbb4c7cee8f5d724b831c9a19315ecacd91de0b /epan/expert.h
parentfcc31e309f1c781d87768307aae929e75780d2fe (diff)
Move the definition of GNUC_FORMAT_CHECK() to its own header, use it in
column-utils.h, and add it to expert.h, so we check the arguments to "expert_add_info_format()", at least if the format argument is a constant string. Fix some more calls to "expert_add_info_format()" to pass it a format string. Don't record BoundsError exceptions as expert events - they merely reflect a capture done with a snapshot length too short to capture all of the packet (any case where it's caused by something else is a bug). svn path=/trunk/; revision=15776
Diffstat (limited to 'epan/expert.h')
-rw-r--r--epan/expert.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/expert.h b/epan/expert.h
index c44a80fab4..235104b10c 100644
--- a/epan/expert.h
+++ b/epan/expert.h
@@ -27,6 +27,8 @@
#ifndef __EXPERT_H__
#define __EXPERT_H__
+#include "gnuc_format_check.h"
+
/** only for internal and display use */
typedef struct expert_info_s {
@@ -45,7 +47,6 @@ extern void
expert_cleanup(void);
/** Add an expert info.
- * XXX - add gcc format string check.
@param pinfo packet info of the currently processed packet
@param pi current protocol item (or NULL)
@@ -54,7 +55,8 @@ expert_cleanup(void);
@param format printf like format string with further infos
*/
extern void
-expert_add_info_format(
-packet_info *pinfo, proto_item *pi, int group, int severity, const char *format, ...);
+expert_add_info_format(packet_info *pinfo, proto_item *pi, int group,
+ int severity, const char *format, ...)
+ GNUC_FORMAT_CHECK(printf, 5, 6);
#endif /* __EXPERT_H__ */