Misra 17.7: puts function should have void output

This commit is contained in:
Riccardo 2019-06-26 13:05:31 -07:00
parent 97a11115bb
commit 8a45958dfe
1 changed files with 2 additions and 3 deletions

View File

@ -17,7 +17,7 @@ void uart_init(USART_TypeDef *u, int baud);
int getc(uart_ring *q, char *elem);
int putc(uart_ring *q, char elem);
int puts(const char *a);
void puts(const char *a);
void puth(unsigned int i);
void hexdump(const void *a, int l);
@ -297,12 +297,11 @@ void putch(const char a) {
}
}
int puts(const char *a) {
void puts(const char *a) {
for (;*a;a++) {
if (*a == '\n') putch('\r');
putch(*a);
}
return 0;
}
void putui(uint32_t i) {