From: Michal Sojka Date: Sat, 31 Aug 2019 21:12:25 +0000 (+0200) Subject: Get rid of compiler warnings (variable was set but never used) X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-test-sw.git/commitdiff_plain/2a263aed0cf4c955851c9a4571c4e0db330bb6b0 Get rid of compiler warnings (variable was set but never used) --- diff --git a/rpp-test-sw/commands/cmd_ping.c b/rpp-test-sw/commands/cmd_ping.c index 509e6d4..2f77e78 100644 --- a/rpp-test-sw/commands/cmd_ping.c +++ b/rpp-test-sw/commands/cmd_ping.c @@ -103,8 +103,8 @@ static void ping_recv(int s){ && (unsigned long)(sys_now() - ping_time) < PING_DELAY-10) { if (len >= (int)(sizeof(struct ip_hdr)+sizeof(struct icmp_echo_hdr))) { - ip_addr_t fromaddr; - inet_addr_to_ipaddr(&fromaddr, &from.sin_addr); + //ip_addr_t fromaddr; + //inet_addr_to_ipaddr(&fromaddr, &from.sin_addr); rpp_sci_printf(" time=%lu ms\n", (unsigned long)(sys_now() - ping_time)); @@ -132,12 +132,11 @@ int cmd_do_eth_ping(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]){ rpp_sci_printf("Eth not initialized run 'ethinit' command first.\n"); return FAILURE; } - err_t err = ERR_OK; // parse params ip_addr_t ping_target; - if ( (err = rpp_eth_stringToIP(&ping_target, (uint8_t *)param[1])) != SUCCESS ) { + if ( (rpp_eth_stringToIP(&ping_target, (uint8_t *)param[1])) != SUCCESS ) { rpp_sci_printf("ERR: IP address format\r\n"); return BAD_OPTION; }