mirror of https://gerrit.osmocom.org/asn1c
pedantic c89 safety
This commit is contained in:
parent
9736348c47
commit
104af19d65
|
@ -79,9 +79,11 @@ dnl Skeletons should be very compatible with most of the compilers, hence
|
|||
dnl very strict backward compatibility flags.
|
||||
SKELETONS_CFLAGS="${ADD_CFLAGS}"
|
||||
AX_CHECK_COMPILE_FLAG([-std=c89],
|
||||
[SKELETONS_FLAGS="$SKELETONS_FLAGS -std=c89"])
|
||||
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -std=c89"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wpedantic],
|
||||
[SKELETONS_FLAGS="$SKELETONS_FLAGS -Wpedantic"])
|
||||
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -Wpedantic"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-duplicate-decl-specifier],
|
||||
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -Wno-duplicate-decl-specifier"])
|
||||
AC_SUBST(SKELETONS_CFLAGS)
|
||||
|
||||
dnl Checks for header files.
|
||||
|
|
|
@ -63,7 +63,7 @@ enum asn_strtol_result_e {
|
|||
ASN_STRTOL_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */
|
||||
ASN_STRTOL_EXPECT_MORE = -1, /* More data expected (e.g. "+") */
|
||||
ASN_STRTOL_OK = 0, /* Conversion succeded, number ends at (*end) */
|
||||
ASN_STRTOL_EXTRA_DATA = 1, /* Conversion succeded, but the string has extra stuff */
|
||||
ASN_STRTOL_EXTRA_DATA = 1 /* Conversion succeded, but the string has extra stuff */
|
||||
};
|
||||
enum asn_strtol_result_e asn_strtol_lim(const char *str, const char **end, long *l);
|
||||
|
||||
|
|
|
@ -652,7 +652,7 @@ OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length,
|
|||
ST_LEADSPACE,
|
||||
ST_TAILSPACE,
|
||||
ST_AFTERVALUE, /* Next character ought to be '.' or a space */
|
||||
ST_WAITDIGITS, /* Next character is expected to be a digit */
|
||||
ST_WAITDIGITS /* Next character is expected to be a digit */
|
||||
} state = ST_LEADSPACE;
|
||||
|
||||
if(!oid_text || oid_txt_length < -1 || (arcs_slots && !arcs)) {
|
||||
|
|
|
@ -15,7 +15,7 @@ ber_decode_primitive(asn_codec_ctx_t *opt_codec_ctx,
|
|||
void **sptr, const void *buf_ptr, size_t size, int tag_mode) {
|
||||
ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr;
|
||||
asn_dec_rval_t rval;
|
||||
ber_tlv_len_t length = 0; // =0 to avoid [incorrect] warning.
|
||||
ber_tlv_len_t length = 0; /* =0 to avoid [incorrect] warning. */
|
||||
|
||||
/*
|
||||
* If the structure is not there, allocate it.
|
||||
|
|
|
@ -59,7 +59,7 @@ void ASN_DEBUG_f(const char *fmt, ...);
|
|||
#define ASN_DEBUG ASN_DEBUG_f
|
||||
#endif /* __GNUC__ */
|
||||
#else /* EMIT_ASN_DEBUG != 1 */
|
||||
static inline void ASN_DEBUG(const char *fmt, ...) { (void)fmt; }
|
||||
static void ASN_DEBUG(const char *fmt, ...) { (void)fmt; }
|
||||
#endif /* EMIT_ASN_DEBUG */
|
||||
#endif /* ASN_DEBUG */
|
||||
|
||||
|
@ -101,7 +101,7 @@ static inline void ASN_DEBUG(const char *fmt, ...) { (void)fmt; }
|
|||
* Check stack against overflow, if limit is set.
|
||||
*/
|
||||
#define _ASN_DEFAULT_STACK_MAX (30000)
|
||||
static inline int
|
||||
static int __attribute__((unused))
|
||||
_ASN_STACK_OVERFLOW_CHECK(asn_codec_ctx_t *ctx) {
|
||||
if(ctx && ctx->max_stack_size) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue