aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1parser
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-06-05 08:17:50 +0000
committerLev Walkin <vlm@lionet.info>2004-06-05 08:17:50 +0000
commitd9bd775af15aa7eacaea301de8344053221b3ba3 (patch)
tree16056f1fa90b24a32b46bcb276b4f5374122125d /libasn1parser
parent70e702872c991a425f25a5c412d6afada7995b37 (diff)
enforsed compilation with -W -Werror
Diffstat (limited to 'libasn1parser')
-rw-r--r--libasn1parser/asn1p_expr_str.h14
-rw-r--r--libasn1parser/asn1p_ref.c3
2 files changed, 9 insertions, 8 deletions
diff --git a/libasn1parser/asn1p_expr_str.h b/libasn1parser/asn1p_expr_str.h
index 02de131b..7d98a55c 100644
--- a/libasn1parser/asn1p_expr_str.h
+++ b/libasn1parser/asn1p_expr_str.h
@@ -45,13 +45,13 @@ static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
/*
* Convert the ASN.1 expression type back into the string representation.
*/
-#define ASN_EXPR_TYPE2STR(type) \
- ( \
- ((type) < 0 \
- || (type) >= sizeof(asn1p_expr_type2str) \
- / sizeof(asn1p_expr_type2str[0])) \
- ? (char *)0 \
- : asn1p_expr_type2str[(type)] \
+#define ASN_EXPR_TYPE2STR(type) \
+ ( \
+ (((ssize_t)type) < 0 \
+ || ((size_t)type) >= sizeof(asn1p_expr_type2str) \
+ / sizeof(asn1p_expr_type2str[0])) \
+ ? (char *)0 \
+ : asn1p_expr_type2str[(type)] \
)
#endif /* ASN1_PARSER_EXPR_STR_H */
diff --git a/libasn1parser/asn1p_ref.c b/libasn1parser/asn1p_ref.c
index 4ac2b32d..af6f6bb2 100644
--- a/libasn1parser/asn1p_ref.c
+++ b/libasn1parser/asn1p_ref.c
@@ -80,7 +80,8 @@ asn1p_ref_name2lextype(char *name) {
int
asn1p_ref_add_component(asn1p_ref_t *ref, char *name, enum asn1p_ref_lex_type_e lex_type) {
- if(!ref || !name || lex_type < RLT_UNKNOWN || lex_type >= RLT_MAX) {
+ if(!ref || !name
+ || (int)lex_type < RLT_UNKNOWN || lex_type >= RLT_MAX) {
errno = EINVAL;
return -1;
}