]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
Get rid of compiler warnings (variable was set but never used)
authorMichal Sojka <michal.sojka@cvut.cz>
Sat, 31 Aug 2019 21:12:25 +0000 (23:12 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Sat, 31 Aug 2019 21:16:08 +0000 (23:16 +0200)
rpp-test-sw/commands/cmd_ping.c

index 509e6d4c22ec11acba582e0ecdb8280362687ef1..2f77e78519d867e3f9625fc26def5624123c9075 100644 (file)
@@ -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;
        }