IAR problem: IAR complains about casting a function pointer to void * in CLSx.c
martin-mm opened this issue · 1 comments
IAR complains about casting a function pointer to void * (seems that GCC is more relaxed here)
CLSx.c:
unsigned CLS1_printfIO(CLS1_ConstStdIOType *io, const char *fmt, ...)
{
va_list args;
unsigned int count = 0;
va_start(args,fmt);
count = XF1_xvformat(CLS1_printfPutChar, io->stdOut, fmt, args);
va_end(args);
return count;
}
Here IAR complains about casting a function pointer to void * (seems that GCC is more relaxed here)
Should be casted in the CLSx.c:
unsigned CLS1_printfIO(CLS1_ConstStdIOType *io, const char *fmt, ...)
{
va_list args;
unsigned int count = 0;
va_start(args,fmt);
count = XF1_xvformat(CLS1_printfPutChar, (void *)(io->stdOut), fmt, args);
va_end(args);
return count;
}
as well:
unsigned CLS1_printf(const char *fmt, ...)
{
va_list args;
unsigned int count = 0;
va_start(args,fmt);
count = XF1_xvformat(CLS1_printfPutChar, (void *)(CLS1_GetStdio()->stdOut), fmt, args);
va_end(args);
return count;
}
fixed now as well: a9c293a
Thank you!