Warning : #167-D - for function sprintf

Hello, colleagues!

My question is about work with function sprintf in Keil C for ARM.

I have a structure for RTC, that looking as:

struct {
	unsigned char		SEC;
	unsigned char		MIN;
	unsigned char		HOUR;
	unsigned char		DWEEK;
	unsigned char		DAY;
	unsigned char		MONTH;
	int		  	YEAR;
 } RTC8583;

I try to write function that showing time:

sprintf (BUFF,"%02d:%02d:%02d", 	
(unsigned)RTC8583.HOUR,(unsigned)RTC8583.MIN,(unsigned)RTC8583.SEC);

And after compilation, a message is displayed all the time:

...

compiling M1132_MAIN.c...

MAIN\M1132_MAIN.c(284): warning:  #167-D: argument of type "BYTE *" is incompatible with parameter of type "char *restrict"

                             sprintf (BUFF,"%02d:%02d:%02d", (unsigned)RTC8583.HOUR,(unsigned)RTC8583.MIN,(unsigned)RTC8583.SEC);

MAIN\M1132_MAIN.c: 1 warning, 0 errors

...  

 

I can’t understand how to do it right so that there is no warning!

It is still strange that neither in Borland C++, nor in Keil C for C51 such a   is observed!

Help me please!

 

More questions in this forum