st/mesa: add int cast to silence warning
authorBrian Paul <brianp@vmware.com>
Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 6 Nov 2012 14:42:37 +0000 (07:42 -0700)
MSVC warns that negating an unsigned value yields an unsigned value.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_cb_fbo.c

index 882fb372b0551107c7d5e9136f9bbbd423b9bd4e..adee00bd2fc0e2cf5ca30996462e0032276fbddf 100644 (file)
@@ -750,7 +750,7 @@ st_MapRenderbuffer(struct gl_context *ctx,
                             usage, x, y2, w, h, &strb->transfer);
    if (map) {
       if (invert) {
-         *rowStrideOut = -strb->transfer->stride;
+         *rowStrideOut = -(int) strb->transfer->stride;
          map += (h - 1) * strb->transfer->stride;
       }
       else {