gallium: Fix some MSVC warnings.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 25 Mar 2008 17:30:34 +0000 (17:30 +0000)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Sat, 29 Mar 2008 02:32:29 +0000 (11:32 +0900)
src/gallium/auxiliary/draw/draw_pt_vcache.c
src/gallium/auxiliary/util/u_snprintf.c

index 98c22eb4d4a563f9e566081404266b52e2c78405..da9a3a52aed6672f1218440ce3ac21cffc544d40 100644 (file)
@@ -107,7 +107,7 @@ static void vcache_elt( struct vcache_frontend *vcache,
       assert(vcache->fetch_count < FETCH_MAX);
 
       vcache->in[idx] = felt;
-      vcache->out[idx] = vcache->fetch_count;
+      vcache->out[idx] = (ushort)vcache->fetch_count;
       vcache->fetch_elts[vcache->fetch_count++] = felt;
    }
 
index 61c20b48f7e4785268a61842a836dfa73736b21b..48426abcb7a4cd5239c0e585113d0c2e263dbf7a 100644 (file)
@@ -783,19 +783,19 @@ rpl_vsnprintf(char *str, size_t size, const char *format, va_list args)
                                switch (cflags) {
                                case PRINT_C_CHAR:
                                        charptr = va_arg(args, signed char *);
-                                       *charptr = len;
+                                       *charptr = (signed char)len;
                                        break;
                                case PRINT_C_SHORT:
                                        shortptr = va_arg(args, short int *);
-                                       *shortptr = len;
+                                       *shortptr = (short int)len;
                                        break;
                                case PRINT_C_LONG:
                                        longptr = va_arg(args, long int *);
-                                       *longptr = len;
+                                       *longptr = (long int)len;
                                        break;
                                case PRINT_C_LLONG:
                                        llongptr = va_arg(args, LLONG *);
-                                       *llongptr = len;
+                                       *llongptr = (LLONG)len;
                                        break;
                                case PRINT_C_SIZE:
                                        /*