Skip to content

Commit

Permalink
fosphor/gl_font: Don't use the format __attribute__ when using MSVC
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
  • Loading branch information
smunaut committed May 22, 2016
1 parent 1e4598f commit 7b6b996
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/fosphor/gl_font.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
* \brief Basic OpenGL font rendering
*/

#ifdef _MSC_VER
# define ATTR_FORMAT(a,b,c)
#else
# define ATTR_FORMAT(a,b,c) __attribute__((format(a,b,c)))
#endif


struct gl_font;

Expand Down Expand Up @@ -60,7 +66,7 @@ void glf_draw_str(const struct gl_font *glf,
void glf_printf(const struct gl_font *glf,
float x, enum glf_align x_align,
float y, enum glf_align y_align,
const char *fmt, ...) __attribute__((format(printf, 6, 7)));
const char *fmt, ...) ATTR_FORMAT(printf, 6, 7);

void glf_begin(const struct gl_font *glf, float fg_color[3]);
void glf_end(void);
Expand Down

0 comments on commit 7b6b996

Please sign in to comment.