From 911795490e9eaf6a27fe5471def7b51b586f45f1 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 16 Dec 2011 19:30:33 -0800 Subject: [PATCH] vwebp: msvc build tweaks snprintf -> _snprintf / remove double->float warnings Change-Id: I5dcdc394cf7e2d37205beaf83ed0f80a18ec06ab --- examples/vwebp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/vwebp.c b/examples/vwebp.c index 4e98220f..553a603b 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -30,6 +30,10 @@ #endif #endif +#ifdef _MSC_VER +#define snprintf _snprintf +#endif + // Unfortunate global variables static const WebPDecBuffer* kPic = NULL; static const char* file_name = NULL; @@ -87,12 +91,12 @@ static void HandleDisplay(void) { char tmp[32]; glColor4f(0.0, 0.0, 0.0, 0.0); - glRasterPos2f(-0.95, 0.90); + glRasterPos2f(-0.95f, 0.90f); PrintString(file_name); snprintf(tmp, sizeof(tmp), "Dimension:%d x %d", kPic->width, kPic->height); glColor4f(0.0, 0.0, 0.0, 0.0); - glRasterPos2f(-0.95, 0.80); + glRasterPos2f(-0.95f, 0.80f); PrintString(tmp); } glFlush();