Skip to content

Commit

Permalink
Merge pull request lcm-proj#504 from nosracd/fix/lcmgen_output_compil…
Browse files Browse the repository at this point in the history
…er_warnings

Fix lcm-gen output's compiler warnings
  • Loading branch information
ihilt authored Apr 8, 2024
2 parents 57b27fc + d70ca21 commit 4951a75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lcmgen/emit_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ static void emit_c_decode_array_cleanup(lcmgen_t *lcm, FILE *f, lcm_struct_t *st

emit(0, "int __%s_decode_array_cleanup(%s *p, int elements)", type_name, type_name);
emit(0, "{");
emit(1, "(void)p;");
emit(1, "int element;");
emit(1, "for (element = 0; element < elements; element++) {");
emit(0, "");
Expand Down Expand Up @@ -1062,7 +1063,7 @@ static void emit_c_struct_subscribe(lcmgen_t *lcm, FILE *f, lcm_struct_t *struct
" int status = lcm_unsubscribe (lcm, hid->lc_h);\n"
" if (0 != status) {\n"
" fprintf(stderr,\n"
" \"couldn't unsubscribe %s_handler %%p!\\n\", hid);\n"
" \"couldn't unsubscribe %s_handler %%p!\\n\", (void*)hid);\n"
" return -1;\n"
" }\n"
" free (hid);\n"
Expand Down

0 comments on commit 4951a75

Please sign in to comment.