aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1fix
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2017-10-19 03:06:35 -0700
committerLev Walkin <vlm@lionet.info>2017-10-19 03:07:27 -0700
commit48e82d1f1f80c40393e5e191cd64866587c7a067 (patch)
tree4073d21bb999f12aacf6203d107641bd9067cce2 /libasn1fix
parentb2d896e4d994203204ea3532db43c571d5ad961e (diff)
removed gcc-7 warnings
Diffstat (limited to 'libasn1fix')
-rw-r--r--libasn1fix/asn1fix_bitstring.c1
-rw-r--r--libasn1fix/asn1fix_constr.c1
-rw-r--r--libasn1fix/asn1fix_crange.c3
-rw-r--r--libasn1fix/asn1fix_cws.c7
-rw-r--r--libasn1fix/asn1fix_internal.h28
5 files changed, 24 insertions, 16 deletions
diff --git a/libasn1fix/asn1fix_bitstring.c b/libasn1fix/asn1fix_bitstring.c
index 007c6a5c..e5f80cd1 100644
--- a/libasn1fix/asn1fix_bitstring.c
+++ b/libasn1fix/asn1fix_bitstring.c
@@ -112,6 +112,7 @@ asn1f_fix_bit_string_value(arg_t *arg, asn1p_expr_t *ttype) {
break;
}
/* Fall through: remove trailing zero bits */
+ /* Fall through */
case ATV_BITVECTOR:
asn1f_BS_remove_trailing_zero_bits(expr->value);
break;
diff --git a/libasn1fix/asn1fix_constr.c b/libasn1fix/asn1fix_constr.c
index 19e8bad4..8f4331c9 100644
--- a/libasn1fix/asn1fix_constr.c
+++ b/libasn1fix/asn1fix_constr.c
@@ -135,6 +135,7 @@ asn1f_fix_constr_ext(arg_t *arg) {
case 3:
FATAL("Third extension marker "
"is not allowed at line %d", v->_lineno);
+ /* Fall through */
default:
r_value = -1;
}
diff --git a/libasn1fix/asn1fix_crange.c b/libasn1fix/asn1fix_crange.c
index b983e498..4c9345d4 100644
--- a/libasn1fix/asn1fix_crange.c
+++ b/libasn1fix/asn1fix_crange.c
@@ -1040,8 +1040,9 @@ asn1constraint_compute_constraint_range(
range->not_OER_visible = 1;
if(!ct
- || (range->not_OER_visible && (cpr_flags & CPR_strict_OER_visibility)))
+ || (range->not_OER_visible && (cpr_flags & CPR_strict_OER_visibility))) {
return range;
+ }
switch(ct->type) {
case ACT_EL_VALUE:
diff --git a/libasn1fix/asn1fix_cws.c b/libasn1fix/asn1fix_cws.c
index 035ccf7a..d2be70d9 100644
--- a/libasn1fix/asn1fix_cws.c
+++ b/libasn1fix/asn1fix_cws.c
@@ -125,10 +125,9 @@ _asn1f_parse_object_cb(const uint8_t *buf, size_t size, void *keyp) {
ret = _asn1f_parse_class_object_data(arg, eclass, row, eclass->with_syntax,
buf, buf + size, 0, 0, key->sequence);
if(ret) {
- LOG((int)(ret < 0),
- "Cannot parse %s of CLASS %s found at line %d",
- expr->Identifier, eclass->Identifier, expr->_lineno);
- asn1p_ioc_row_delete(row);
+ LOG(ret, "Cannot parse %s of CLASS %s found at line %d",
+ expr->Identifier, eclass->Identifier, expr->_lineno);
+ asn1p_ioc_row_delete(row);
return ret;
}
diff --git a/libasn1fix/asn1fix_internal.h b/libasn1fix/asn1fix_internal.h
index 4e13293a..5fd7e768 100644
--- a/libasn1fix/asn1fix_internal.h
+++ b/libasn1fix/asn1fix_internal.h
@@ -83,17 +83,23 @@ typedef struct arg_s {
* Merge the return value of the called function with the already
* partially computed return value of the current function.
*/
-#define RET2RVAL(ret,rv) do { \
- int __ret = ret; \
- switch(__ret) { \
- case 0: break; \
- case 1: if(rv) break; \
- case -1: rv = __ret; break; \
- default: \
- assert(__ret >= -1 && __ret <= 1); \
- rv = -1; \
- } \
- } while(0)
+#define RET2RVAL(ret, rv) \
+ do { \
+ int __ret = ret; \
+ switch(__ret) { \
+ case 0: \
+ break; \
+ case 1: \
+ if(rv) break; \
+ /* Fall through */ \
+ case -1: \
+ rv = __ret; \
+ break; \
+ default: \
+ assert(__ret >= -1 && __ret <= 1); \
+ rv = -1; \
+ } \
+ } while(0)
/*
* Temporary substitute module for the purposes of evaluating expression.