]> rtime.felk.cvut.cz Git - rpp-test-sw.git/commitdiff
Compile warning repaired
authorMichal Horn <hornmich@fel.cvut.cz>
Wed, 31 Jul 2013 09:19:44 +0000 (11:19 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Wed, 31 Jul 2013 09:19:44 +0000 (11:19 +0200)
return value added,
bad escape sequence \% in printf repaired to %%

commands/cmd_hout.c
commands/cmd_spi.c

index 5509f1cf2f03f7dab8e09c6ad5cdcb6781cc1968..3e9df06d1df9427e075a52306abd601a2aafde0f 100644 (file)
@@ -136,7 +136,7 @@ int cmd_do_hout_pwm(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
                double period = hout_pwm_get_period(pin);
                uint32_t duty = hout_pwm_get_duty(pin);
 
-               rpp_sci_printf("houtpwm%d_period=%g\r\nhoutpwm%d_duty=%u\%", pin+1, period, pin+1, duty);
+               rpp_sci_printf("houtpwm%d_period=%g\r\nhoutpwm%d_duty=%u%%", pin+1, period, pin+1, duty);
                return 0;
          }
 }
index c5ed4559349958cc01b955059d530fd49451afde..c692f11d4f63f6f335d1fa606c426d70c9ccf1a0 100644 (file)
@@ -124,7 +124,7 @@ int spimst_print_rx(struct spi_drv *ifc, int status, int addr, uint8_t *buf)
 
        if (status < 0) {
                rpp_sci_printf("spirx failed: %d\n", status);
-               return;
+               return -1;
        }
 
        rpp_sci_printf("spirx:%#x(", addr);