Commit bd3dea9b authored by johvik's avatar johvik

Add (void) when st is unused

This is to get rid of the GCC warning:
"warning: unused variable ‘st’ [-Wunused-variable]"
parent 4021e4ba
......@@ -195,6 +195,9 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
OUT("1 /* No applicable constraints whatsoever */");
OUT(") {\n");
INDENT(-1);
if(produce_st) {
INDENTED(OUT("(void)st; /* Unused variable */\n"));
}
INDENTED(OUT("/* Nothing is here. See below */\n"));
OUT("}\n");
OUT("\n");
......
......@@ -42,6 +42,7 @@ T_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
if(1 /* No applicable constraints whatsoever */) {
(void)st; /* Unused variable */
/* Nothing is here. See below */
}
......
......@@ -159,6 +159,7 @@ CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
if(1 /* No applicable constraints whatsoever */) {
(void)st; /* Unused variable */
/* Nothing is here. See below */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment