There is another (harmless) warning in the same file at ~ line 1534: switch(cb->tcpcb_connection_state) { case FNET_TCP_CS_SYN_SENT: case FNET_TCP_CS_LISTENING: break; case FNET_TCP_CS_SYN_RCVD: if((cb->tcpcb_prev_connection_state == FNET_TCP_CS_SYN_SENT) && (tcp_seq == (cb->tcpcb_sndack - 1u))) { break; } __attribute__ ((fallthrough)); /* Avoid compiler warning "this statement may fall through" */ default: /* Close the socket and send the reset segment.*/ _fnet_tcp_send_rst(&sk->options, insegment,...
There is another (harmless) warning in the same file at ~ line 1534: switch(cb->tcpcb_connection_state) { case FNET_TCP_CS_SYN_SENT: case FNET_TCP_CS_LISTENING: break; case FNET_TCP_CS_SYN_RCVD: if((cb->tcpcb_prev_connection_state == FNET_TCP_CS_SYN_SENT) && (tcp_seq == (cb->tcpcb_sndack - 1u))) { break; } __attribute__ ((fallthrough)); /* Avoid compiler warning "this statement may fall through" */ default: /* Close the socket and send the reset segment.*/ _fnet_tcp_send_rst(&sk->options, insegment,...
This part of code in fnet_tcp.c looks at least dubious with respect to the evaluation order: static void _fnet_tcp_initial_seq_number_update( void ) { /* Increase Initial Sequence Number. */ _fnet_tcp_initial_seq_number += FNET_TCP_INITIAL_SEQ_NUMBER_STEP + fnet_rand() & 0xFF; } According to the C rules it adds the left two operands first and LATER ands it with 0xff resulting in step of maximal 0-255 ? Shouldn't the code be this? : static void fnettcpinitialseqnumberupdate( void ) { / Increase Initial...
Fix type of variables to avoid warnings.
Fix some additional typos.
Fix typos in sources.
Will you accept any pull request? If so I assume I can make a merge request? NOTE: This means changing all fnet_printf() into FNET_DEBUG_PRINTF() in the core code where it is used for debugging. (So nowhere in the applications/demos where the use is OK)
This is not what I meant, for example if i look at fnet_stack/stack/fnet_eth.c @ function fnet_eth_trace() the fnet_printf is clearly used as debug output. I indeed saw that a "stream" is used with some get/put methods to control it but I did not find a way to specify it without modifying the FNET stack code itself. It looks like it always want to send it to some serial port. For example I would like to send it to our the jtag (swo_debug) lookalike device because all our serial ports (in this case...