aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2016-01-10 20:41:57 -0800
committerLev Walkin <vlm@lionet.info>2016-01-10 20:41:57 -0800
commit483c14fcecf75316cdcbc59e6f3f95c2a52286c2 (patch)
treebd74c7912ad45f2d8bd0c5b75b6c36f8be79f578
parent04abdb24636ed70603c090ae6e00bba4af9c0a8b (diff)
gcc warning fix?
-rw-r--r--libasn1parser/asn1p_expr_str.h8
-rwxr-xr-xlibasn1parser/expr-h.pl8
2 files changed, 8 insertions, 8 deletions
diff --git a/libasn1parser/asn1p_expr_str.h b/libasn1parser/asn1p_expr_str.h
index ea77c6c2..faa1cf8d 100644
--- a/libasn1parser/asn1p_expr_str.h
+++ b/libasn1parser/asn1p_expr_str.h
@@ -51,11 +51,11 @@ static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
/*
* Convert the ASN.1 expression type back into the string representation.
*/
-#define ASN_EXPR_TYPE2STR(type) _asn_expr_type2str(type)
+#define ASN_EXPR_TYPE2STR(type) _asn1p_expr_type2string(type)
-static char * __attribute__((unused))
-_asn_expr_type2str(size_t type) {
- assert((ssize_t)type >= 0);
+static inline char * __attribute__((unused))
+_asn1p_expr_type2string(asn1p_expr_type_e type) {
+ assert((signed int)type >= 0);
if(type < sizeof(asn1p_expr_type2str)/sizeof(asn1p_expr_type2str[0]))
return asn1p_expr_type2str[type];
return NULL;
diff --git a/libasn1parser/expr-h.pl b/libasn1parser/expr-h.pl
index 27f4b9c4..99520b6b 100755
--- a/libasn1parser/expr-h.pl
+++ b/libasn1parser/expr-h.pl
@@ -42,11 +42,11 @@ print<<EOM;
/*
* Convert the ASN.1 expression type back into the string representation.
*/
-#define ASN_EXPR_TYPE2STR(type) _asn_expr_type2str(type)
+#define ASN_EXPR_TYPE2STR(type) _asn1p_expr_type2string(type)
-static char * __attribute__((unused))
-_asn_expr_type2str(size_t type) {
- assert((ssize_t)type >= 0);
+static inline char * __attribute__((unused))
+_asn1p_expr_type2string(asn1p_expr_type_e type) {
+ assert((signed int)type >= 0);
if(type < sizeof(asn1p_expr_type2str)/sizeof(asn1p_expr_type2str[0]))
return asn1p_expr_type2str[type];
return NULL;