Kaynağa Gözat

Fix compiler warning: sketch/uart2.c:48:1: warning: control reaches end of non-void function [-Wreturn-type]

Marek Bel 5 yıl önce
ebeveyn
işleme
bc99db8233
2 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 1 1
      Firmware/uart2.c
  2. 2 2
      Firmware/uart2.h

+ 1 - 1
Firmware/uart2.c

@@ -41,7 +41,7 @@ void uart2_init(void)
 	fdev_setup_stream(uart2io, uart2_putchar, uart2_getchar, _FDEV_SETUP_WRITE | _FDEV_SETUP_READ); //setup uart2 i/o stream
 }
 
-uint8_t uart2_rx_clr(void)
+void uart2_rx_clr(void)
 {
 	rbuf_w(uart2_ibuf) = 0;
 	rbuf_r(uart2_ibuf) = 0;

+ 2 - 2
Firmware/uart2.h

@@ -18,7 +18,7 @@ extern FILE _uart2io;
 
 extern void uart2_init(void);
 
-extern uint8_t uart2_rx_clr(void);
+extern void uart2_rx_clr(void);
 
 extern uint8_t uart2_rx_ok(void);
 
@@ -26,4 +26,4 @@ extern uint8_t uart2_rx_ok(void);
 #if defined(__cplusplus)
 }
 #endif //defined(__cplusplus)
-#endif //_UART2_H
+#endif //_UART2_H