rm warnings
diff --git a/libasn1parser/asn1p_class.c b/libasn1parser/asn1p_class.c
index 666e0a2..3312e4d 100644
--- a/libasn1parser/asn1p_class.c
+++ b/libasn1parser/asn1p_class.c
@@ -29,7 +29,7 @@
columns = 0;
TQ_FOR(field, &oclass->members, next) {
- int fieldIdLen = strlen(field->Identifier);
+ size_t fieldIdLen = strlen(field->Identifier);
if(fieldIdLen > row->max_identifier_length)
row->max_identifier_length = fieldIdLen;
row->column[columns].field = field;
@@ -42,10 +42,9 @@
void
asn1p_ioc_row_delete(asn1p_ioc_row_t *row) {
- int i;
if(row) {
if(row->column) {
- for(i = 0; i < row->columns; i++) {
+ for(size_t i = 0; i < row->columns; i++) {
if(!row->column[i].new_ref && row->column[i].value) {
/*
* Field 'reference' comes from asn1fix_cws.c :
@@ -94,8 +93,7 @@
struct asn1p_ioc_cell_s *
asn1p_ioc_row_cell_fetch(asn1p_ioc_row_t *row, const char *fieldname) {
- int i;
- for(i = 0; i < row->columns; i++) {
+ for(size_t i = 0; i < row->columns; i++) {
if(strcmp(row->column[i].field->Identifier, fieldname) == 0)
return &row->column[i];
}
diff --git a/libasn1parser/asn1p_class.h b/libasn1parser/asn1p_class.h
index 08fd374..3fd27ef 100644
--- a/libasn1parser/asn1p_class.h
+++ b/libasn1parser/asn1p_class.h
@@ -14,8 +14,8 @@
struct asn1p_expr_s *value; /* may be left uninitialized */
int new_ref;
} *column;
- int columns;
- int max_identifier_length;
+ size_t columns;
+ size_t max_identifier_length;
} asn1p_ioc_row_t;
asn1p_ioc_row_t *asn1p_ioc_row_new(struct asn1p_expr_s *oclass);
diff --git a/libasn1parser/asn1p_constr.c b/libasn1parser/asn1p_constr.c
index a9e939d..e83b2f8 100644
--- a/libasn1parser/asn1p_constr.c
+++ b/libasn1parser/asn1p_constr.c
@@ -24,6 +24,8 @@
int asn1p_constraint_compare(const asn1p_constraint_t *a,
const asn1p_constraint_t *b) {
+ (void)a;
+ (void)b;
assert(!"Constraint comparison is not implemented");
return -1;
}
diff --git a/libasn1parser/asn1p_expr.c b/libasn1parser/asn1p_expr.c
index 4383ea1..eb5fc79 100644
--- a/libasn1parser/asn1p_expr.c
+++ b/libasn1parser/asn1p_expr.c
@@ -346,9 +346,8 @@
free(expr->specializations.pspec);
}
if(expr->object_class_matrix.row) {
- int row;
- for(row = 0; row < expr->object_class_matrix.rows; row++) {
- asn1p_ioc_row_delete(expr->object_class_matrix.row[row]);
+ for(size_t row = 0; row < expr->object_class_matrix.rows; row++) {
+ asn1p_ioc_row_delete(expr->object_class_matrix.row[row]);
}
free(expr->object_class_matrix.row);
}
diff --git a/libasn1parser/asn1p_expr.h b/libasn1parser/asn1p_expr.h
index 524f532..c391361 100644
--- a/libasn1parser/asn1p_expr.h
+++ b/libasn1parser/asn1p_expr.h
@@ -181,8 +181,8 @@
/* Information Object Class matrix, specific for this class */
struct asn1p_ioc_matrix_s {
asn1p_ioc_row_t **row;
- int rows;
- int max_identifier_length;
+ size_t rows;
+ size_t max_identifier_length;
} object_class_matrix;
/*
diff --git a/libasn1parser/asn1p_ref.c b/libasn1parser/asn1p_ref.c
index 64f51b4..ebb1731 100644
--- a/libasn1parser/asn1p_ref.c
+++ b/libasn1parser/asn1p_ref.c
@@ -24,7 +24,7 @@
asn1p_ref_free(asn1p_ref_t *ref) {
if(ref) {
if(ref->components) {
- int i = ref->comp_count;
+ size_t i = ref->comp_count;
while(i--) {
free(ref->components[i].name);
ref->components[i].name = 0;
@@ -127,8 +127,7 @@
newref = asn1p_ref_new(ref->_lineno, ref->module);
if(newref) {
- int i;
- for(i = 0; i < ref->comp_count; i++) {
+ for(size_t i = 0; i < ref->comp_count; i++) {
if(asn1p_ref_add_component(newref,
ref->components[i].name,
ref->components[i].lex_type
diff --git a/libasn1parser/asn1p_ref.h b/libasn1parser/asn1p_ref.h
index 776289b..c5a99c1 100644
--- a/libasn1parser/asn1p_ref.h
+++ b/libasn1parser/asn1p_ref.h
@@ -34,8 +34,8 @@
char *name; /* An identifier */
} *components;
- int comp_count; /* Number of the components in the reference name. */
- int comp_size; /* Number of allocated structures */
+ size_t comp_count; /* Number of the components in the reference name. */
+ size_t comp_size; /* Number of allocated structures */
struct asn1p_module_s *module; /* Defined in module */
int _lineno; /* Number of line in the file */