Mesa (master): st/wgl: eliminate implicit cast warning

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 14 11:18:56 UTC 2020


Module: Mesa
Branch: master
Commit: 1a1e5a763a550b96285f10c66c2d96d5c224c2c1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a1e5a763a550b96285f10c66c2d96d5c224c2c1

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Sep 20 16:07:47 2019 +0200

st/wgl: eliminate implicit cast warning

I get warnings on MSVC for these implicit casts. Let's use explicit
casts instead.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/state_trackers/wgl/stw_wgl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/stw_wgl.c b/src/gallium/state_trackers/wgl/stw_wgl.c
index 532a5adb955..846069f56b9 100644
--- a/src/gallium/state_trackers/wgl/stw_wgl.c
+++ b/src/gallium/state_trackers/wgl/stw_wgl.c
@@ -258,8 +258,10 @@ wglUseFontBitmapsW(
 
       if (size != GDI_ERROR) {
          if (size == 0) {
-            glBitmap(0, 0, -gm.gmptGlyphOrigin.x, gm.gmptGlyphOrigin.y,
-                     gm.gmCellIncX, gm.gmCellIncY, NULL);
+            glBitmap(0, 0, (GLfloat)-gm.gmptGlyphOrigin.x,
+                     (GLfloat)gm.gmptGlyphOrigin.y,
+                     (GLfloat)gm.gmCellIncX,
+                     (GLfloat)gm.gmCellIncY, NULL);
          }
          else {
             buffer = realloc(buffer, size);



More information about the mesa-commit mailing list