]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
Do not issue warning about unreachable code
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 2 Sep 2015 05:48:57 +0000 (07:48 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 3 Sep 2015 08:30:59 +0000 (10:30 +0200)
We keep the return statement here for the case that the function will
be modified and return will become reachable again.

rpp-test-sw/commands/cmd_port.c

index 5f404d73bc08b06b735770f365086917a40ce151..c8ed23df7880307fa7a8ab7653510fb6c6f4b135 100644 (file)
@@ -203,7 +203,9 @@ int cmd_do_port_val(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
                        return -CMDERR_NODEV;
                }
        }
-       return 0;
+#pragma diag_remark 112
+       return 0; //warning #112-D: statement is unreachable
+#pragma diag_warning 112
 }
 
 #endif  /* DOCGEN */