bsp: xil_printf: Specify attribute(format)

Specify the format attribute for the xil_printf() function to allow the
compiler to do printf-style checking of the format string and arguments.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
This commit is contained in:
Soren Brinkmann 2015-06-09 14:55:40 -07:00 committed by Nava kishore Manne
parent ef374e062b
commit bacc86609f
5 changed files with 5 additions and 5 deletions

View file

@ -32,7 +32,7 @@ typedef s32 (*func_ptr)(int c);
/* */
void xil_printf( const char8 *ctrl1, ...);
void xil_printf( const char8 *ctrl1, ...) __attribute__((format(printf, 1, 2)));
void print( const char8 *ptr);
extern void outbyte (char8 c);
extern char8 inbyte(void);

View file

@ -32,7 +32,7 @@ typedef s32 (*func_ptr)(int c);
/* */
void xil_printf( const char8 *ctrl1, ...);
void xil_printf( const char8 *ctrl1, ...) __attribute__((format(printf, 1, 2)));
void print( const char8 *ptr);
extern void outbyte (char8 c);
extern char8 inbyte(void);

View file

@ -32,7 +32,7 @@ typedef s32 (*func_ptr)(int c);
/* */
void xil_printf( const char8 *ctrl1, ...);
void xil_printf( const char8 *ctrl1, ...) __attribute__((format(printf, 1, 2)));
void print( const char8 *ptr);
extern void outbyte (char8 c);
extern char8 inbyte(void);

View file

@ -32,7 +32,7 @@ typedef s32 (*func_ptr)(int c);
/* */
void xil_printf( const char8 *ctrl1, ...);
void xil_printf( const char8 *ctrl1, ...) __attribute__((format(printf, 1, 2)));
void print( const char8 *ptr);
extern void outbyte (char8 c);
extern char8 inbyte(void);

View file

@ -38,7 +38,7 @@
extern "C" {
#endif
void xil_printf(const char8 *ctrl1, ...);
void xil_printf(const char8 *ctrl1, ...) __attribute__((format(printf, 1, 2)));
void print(char *ptr);
#ifdef __cplusplus