I am using Avr-gcc-9.1.0

Here's some code (just cut paste from AVR-lib):

//      .......
#include <stdio.h>
//      ......

void uart_putchar(char c, FILE *stream)
 if (c == '\n')
uart_putchar('\r', stream);
 loop_until_bit_is_set(UCSRA, UDRE);
 UDR = c;
 return ;
//set stream pointer
static FILE mystdout = FDEV_SETUP_STREAM(uart_putchar, NULL,

I am getting this warning:

In file included from PkLoad-6D-Ser-72x72x65-1214.c:12:
PkLoad-6D-Ser-72x72x65-1214.c:86:42: warning: initialization of 'int
(*)(char,  struct __file *)' from incompatible pointer type 'void (*)(char,
 FILE *)' {aka 'void (*)(char,  struct __file *)'}

The code compiles (but for this warning) and works too, on hardware.

This code worked fine in older version of AVR-GCC (4.6 and earlier)

I ignored this warning for a long time.
Recently, I  got curious as to the nature of the error.

So what has changed recently ? Thanks!

Best Regards,

-- Royce Pereira

Reply via email to