Hello, I have an error on keil µvision 5 and i don't arrive to resolve it. this is the error: ..\Src\utilsSPIRIT1.c(148): error: #55-D: too many arguments in invocation of macro "Error_Handler"
this is the declaration of my fonction :
void Error_Handler(char * c) { printf(" >>> ERROR @ %02dh%02dm%02ds : %s\r\n", time.Hours, time.Minutes, time.Seconds, c); }
here is a function call :
Error_Handler("Com rx bad");
Someone know how i can resolve my issue ?
Isn't the answer obvious from the message itself?
It's clearly telling you that you have supplied too many arguments - so the answer, obviously, is to provide fewer arguments.
Simples!
Please follow the instructions for posting source code - look at this picture to help you: www.danlhenry.com/.../keil_code.png
Again, you need to read what the message is telling you: it is specifically referring to a macro called "Error_Handler" - not a function ...
Sure there's not a void Error_Handler(void) prototype somewhere in the source? Do a "Find in Files" and see all definitions and usage
But, again, the message specifically says the error is found in a macro - not a function.
So, presumably, there is a macro called "Error_Handler" being defined somewhere
"Do a 'Find in Files' and see all definitions and usage"
Indeed!