forked from osmocom/wireshark
Do __attribute__ stuff if the GCC version number is greater than or
equal to 2, not just if it's equal to 2 - GCC 3.0 makes it 3, not 2.... svn path=/trunk/; revision=3765
This commit is contained in:
parent
6287e86539
commit
cc21ec8124
|
@ -1,7 +1,7 @@
|
|||
/* column-utils.h
|
||||
* Definitions for column utility structures and routines
|
||||
*
|
||||
* $Id: column-utils.h,v 1.1 2001/04/01 07:32:35 hagbard Exp $
|
||||
* $Id: column-utils.h,v 1.2 2001/07/22 10:25:49 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -45,7 +45,7 @@ void col_set_writable(frame_data *fd, gboolean writable);
|
|||
gint check_col(frame_data *, gint);
|
||||
void col_clear(frame_data *, gint);
|
||||
void col_set_str(frame_data *, gint, gchar *);
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
void col_add_fstr(frame_data *, gint, gchar *, ...)
|
||||
__attribute__((format (printf, 3, 4)));
|
||||
void col_append_fstr(frame_data *, gint, gchar *, ...)
|
||||
|
|
34
epan/proto.h
34
epan/proto.h
|
@ -1,7 +1,7 @@
|
|||
/* proto.h
|
||||
* Definitions for protocol display
|
||||
*
|
||||
* $Id: proto.h,v 1.13 2001/06/18 02:18:24 guy Exp $
|
||||
* $Id: proto.h,v 1.14 2001/07/22 10:25:49 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -140,7 +140,7 @@ void proto_init(const char *plugin_dir, void (register_all_protocols)(void),
|
|||
void proto_cleanup(void);
|
||||
|
||||
/* Set text of proto_item after having already been created. */
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
void proto_item_set_text(proto_item *ti, const char *format, ...)
|
||||
__attribute__((format (printf, 2, 3)));
|
||||
#else
|
||||
|
@ -187,7 +187,7 @@ proto_tree_add_item_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb,
|
|||
gint start, gint length, gboolean little_endian);
|
||||
|
||||
/* Add a FT_NONE to a proto_tree */
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const char *format, ...)
|
||||
|
@ -199,7 +199,7 @@ proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint st
|
|||
#endif
|
||||
|
||||
/* Add a FT_PROTOCOL to a proto_tree */
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const char *format, ...)
|
||||
|
@ -219,7 +219,7 @@ proto_item *
|
|||
proto_tree_add_bytes_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const guint8* start_ptr);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_bytes_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const guint8* start_ptr, const char *format, ...)
|
||||
|
@ -239,7 +239,7 @@ proto_item *
|
|||
proto_tree_add_time_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, struct timeval* value_ptr);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, struct timeval* value_ptr, const char *format, ...)
|
||||
|
@ -259,7 +259,7 @@ proto_item *
|
|||
proto_tree_add_ipxnet_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_ipxnet_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value, const char *format, ...)
|
||||
|
@ -279,7 +279,7 @@ proto_item *
|
|||
proto_tree_add_ipv4_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_ipv4_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value, const char *format, ...)
|
||||
|
@ -299,7 +299,7 @@ proto_item *
|
|||
proto_tree_add_ipv6_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const guint8* value_ptr);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_ipv6_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const guint8* value_ptr, const char *format, ...)
|
||||
|
@ -319,7 +319,7 @@ proto_item *
|
|||
proto_tree_add_ether_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const guint8* value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_ether_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const guint8* value, const char *format, ...)
|
||||
|
@ -339,7 +339,7 @@ proto_item *
|
|||
proto_tree_add_string_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const char* value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_string_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, const char* value, const char *format, ...)
|
||||
|
@ -359,7 +359,7 @@ proto_item *
|
|||
proto_tree_add_boolean_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_boolean_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value, const char *format, ...)
|
||||
|
@ -379,7 +379,7 @@ proto_item *
|
|||
proto_tree_add_double_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, double value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_double_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, double value, const char *format, ...)
|
||||
|
@ -399,7 +399,7 @@ proto_item *
|
|||
proto_tree_add_uint_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_uint_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, guint32 value, const char *format, ...)
|
||||
|
@ -419,7 +419,7 @@ proto_item *
|
|||
proto_tree_add_int_hidden(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, gint32 value);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start,
|
||||
gint length, gint32 value, const char *format, ...)
|
||||
|
@ -432,7 +432,7 @@ proto_tree_add_int_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint sta
|
|||
|
||||
|
||||
/* Add a text-only node to the proto_tree */
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length, const char *,
|
||||
...) __attribute__((format (printf, 5, 6)));
|
||||
|
@ -453,7 +453,7 @@ proto_tree_add_notext(proto_tree *tree, tvbuff_t *tvb, gint start, gint length);
|
|||
|
||||
/* Useful for quick debugging. Also sends string to STDOUT, so don't
|
||||
* leave call to this function in production code. */
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
proto_item *
|
||||
proto_tree_add_debug_text(proto_tree *tree, const char *format, ...)
|
||||
__attribute__((format (printf, 2, 3)));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Definitions for dialog box routines with toolkit-independent APIs but
|
||||
* toolkit-dependent implementations.
|
||||
*
|
||||
* $Id: simple_dialog.h,v 1.2 2000/10/09 06:38:34 guy Exp $
|
||||
* $Id: simple_dialog.h,v 1.3 2001/07/22 10:25:48 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -44,7 +44,7 @@ extern "C" {
|
|||
#define ESD_BTN_OK 0
|
||||
#define ESD_BTN_CANCEL 1
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
void simple_dialog(gint, gint *, gchar *, ...)
|
||||
__attribute__((format (printf, 3, 4)));
|
||||
#else
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: snprintf.h,v 1.5 2000/11/21 21:24:52 guy Exp $
|
||||
* $Id: snprintf.h,v 1.6 2001/07/22 10:25:48 guy Exp $
|
||||
*/
|
||||
|
||||
#ifndef __ETHEREAL_SNPRINTF_H__
|
||||
|
@ -14,7 +14,7 @@
|
|||
extern int vsnprintf(char *string, size_t length, const char * format,
|
||||
va_list args);
|
||||
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
extern int snprintf(char *string, size_t length, const char * format, ...)
|
||||
__attribute__((format (printf, 3, 4)));
|
||||
#else
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
** drh@acm.org
|
||||
** http://www.hwaci.com/drh/
|
||||
**
|
||||
** $Id: lemon.c,v 1.10 2001/06/26 20:52:19 guy Exp $
|
||||
** $Id: lemon.c,v 1.11 2001/07/22 10:25:50 guy Exp $
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -263,7 +263,7 @@ void Configlist_eat(struct config *);
|
|||
void Configlist_reset(void);
|
||||
|
||||
/********* From the file "error.h" ***************************************/
|
||||
#if __GNUC__ == 2
|
||||
#if __GNUC__ >= 2
|
||||
void ErrorMsg( char *, int, char *, ... )
|
||||
__attribute__((format (printf, 3, 4)));
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue