diff options
author | Brian Paul <[email protected]> | 2004-12-03 15:24:34 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-12-03 15:24:34 +0000 |
commit | a760ccf6d8a1f94d505b4c211ff4c30bc1d325a8 (patch) | |
tree | 27b266d1b4acc7d09551c4f3ca30129f74e39f18 /src/mesa/drivers/x11 | |
parent | 025aa9efcd8213ce530818cfd8be1b6d9e945b2c (diff) |
silence a variety of warnings found with g++ 3.4.2
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r-- | src/mesa/drivers/x11/xm_span.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c index 6e4bcb18a05..3ebca32bcfe 100644 --- a/src/mesa/drivers/x11/xm_span.c +++ b/src/mesa/drivers/x11/xm_span.c @@ -3471,8 +3471,8 @@ clip_for_xgetimage(XMesaContext xmesa, GLuint *n, GLint *x, GLint *y) XMesaBuffer source = xmesa->xm_buffer; Window rootWin = RootWindow(xmesa->display, 0); Window child; - int screenWidth = WidthOfScreen(DefaultScreenOfDisplay(xmesa->display)); - int dx, dy; + GLint screenWidth = WidthOfScreen(DefaultScreenOfDisplay(xmesa->display)); + GLint dx, dy; XTranslateCoordinates(xmesa->display, source->buffer, rootWin, *x, *y, &dx, &dy, &child); if (dx >= screenWidth) { @@ -3481,17 +3481,17 @@ clip_for_xgetimage(XMesaContext xmesa, GLuint *n, GLint *x, GLint *y) } if (dx < 0) { /* clipped on left */ - int clip = -dx; - if (clip >= *n) + GLint clip = -dx; + if (clip >= (GLint) *n) return -1; /* totally clipped on left */ *x += clip; *n -= clip; dx = 0; return clip; } - if (dx + *n > screenWidth) { + if ((GLint) (dx + *n) > screenWidth) { /* clipped on right */ - int clip = dx + *n - screenWidth; + GLint clip = dx + *n - screenWidth; *n -= clip; } return 0; |