#include "asn1_get.h"
#include "asn1_misc.h"
+#if __GNUC__ >= 3
+#define KRB5_ATTR_UNUSED __attribute__((unused))
+#else
+#define KRB5_ATTR_UNUSED
+#endif
+
#define clean_return(val) { retval = val; goto error_out; }
/* Declare useful decoder variables. */
-#define setup() \
- asn1_error_code retval; \
- asn1_class asn1class; \
- asn1_construction construction; \
- asn1_tagnum tagnum; \
- unsigned int length, taglen
+#define setup() \
+ asn1_error_code retval; \
+ asn1_class asn1class; \
+ asn1_construction construction KRB5_ATTR_UNUSED; \
+ asn1_tagnum tagnum; \
+ unsigned int length, taglen KRB5_ATTR_UNUSED
#define unused_var(x) if (0) { x = 0; x = x - x; }
#define begin_choice() \
asn1buf subbuf; \
int seqindef; \
- int indef; \
+ int indef KRB5_ATTR_UNUSED; \
taginfo t; \
retval = asn1_get_tag_2(buf, &t); \
if (retval) clean_return(retval); \
* meant to be called in an inner block that ends with a call to
* end_sequence_of().
*/
-#define sequence_of(buf) \
- unsigned int length, taglen; \
- asn1_class asn1class; \
- asn1_construction construction; \
- asn1_tagnum tagnum; \
- int indef; \
+#define sequence_of(buf) \
+ unsigned int length, taglen KRB5_ATTR_UNUSED ; \
+ asn1_class asn1class; \
+ asn1_construction construction KRB5_ATTR_UNUSED ; \
+ asn1_tagnum tagnum; \
+ int indef; \
sequence_of_common(buf)
/*
#include "asn1_get.h"
#include "asn1_misc.h"
+#if __GNUC__ >= 3
+#define KRB5_ATTR_UNUSED __attribute__((unused))
+#else
+#define KRB5_ATTR_UNUSED
+#endif
+
/* setup *********************************************************/
/* set up variables */
/*
retval = asn1buf_wrap_data(&buf,code); \
if (retval) return retval
-#define setup_no_tagnum(type) \
- asn1_class asn1class; \
- asn1_construction construction; \
+#define setup_no_tagnum(type) \
+ asn1_class asn1class KRB5_ATTR_UNUSED; \
+ asn1_construction construction KRB5_ATTR_UNUSED; \
setup_buf_only(type)
#define setup_no_length(type) \
- asn1_tagnum tagnum; \
+ asn1_tagnum tagnum KRB5_ATTR_UNUSED; \
setup_no_tagnum(type)
#define setup(type) \
/* decode sequence header and initialize tagnum with the first field */
#define begin_structure() \
- unsigned int taglen; \
+ unsigned int taglen KRB5_ATTR_UNUSED; \
asn1buf subbuf; \
int seqindef; \
int indef; \