]> Creatis software - gdcm.git/blobdiff - src/gdcmjasper/src/libjasper/base/jas_icc.c
COMP: applying partial patch sent to jasper group, to please VS7.1
[gdcm.git] / src / gdcmjasper / src / libjasper / base / jas_icc.c
index 5794e2c5a020fb8dc585a07cc43d4cf388446b62..9d0ecf05d1054e90b62c7cbaef64eadd47429b1c 100644 (file)
@@ -1600,7 +1600,7 @@ static int jas_iccgetuint16(jas_stream_t *in, jas_iccuint16_t *val)
   ulonglong tmp;
   if (jas_iccgetuint(in, 2, &tmp))
     return -1;
-  *val = tmp;
+  *val = (jas_iccuint16_t)tmp; /* warning C4244: '=' : conversion from 'ulonglong' to 'jas_iccuint16_t', possible loss of data */
   return 0;
 }
 
@@ -1609,8 +1609,8 @@ static int jas_iccgetsint32(jas_stream_t *in, jas_iccsint32_t *val)
   ulonglong tmp;
   if (jas_iccgetuint(in, 4, &tmp))
     return -1;
-  *val = (tmp & 0x80000000) ? (-JAS_CAST(longlong, (((~tmp) &
-    0x7fffffff) + 1))) : JAS_CAST(longlong, tmp);
+  *val = (jas_iccsint32_t)((tmp & 0x80000000) ? (-JAS_CAST(longlong, (((~tmp) &
+    0x7fffffff) + 1))) : JAS_CAST(longlong, tmp)); /* warning C4244: '=' : conversion from 'longlong' to 'jas_iccsint32_t', possible loss of data */
   return 0;
 }
 
@@ -1619,7 +1619,7 @@ static int jas_iccgetuint32(jas_stream_t *in, jas_iccuint32_t *val)
   ulonglong tmp;
   if (jas_iccgetuint(in, 4, &tmp))
     return -1;
-  *val = tmp;
+  *val = (jas_iccuint32_t)tmp; /* warning C4244: '=' : conversion from 'ulonglong' to 'jas_iccuint32_t', possible loss of data */
   return 0;
 }
 
@@ -1637,7 +1637,7 @@ static int jas_iccputuint(jas_stream_t *out, int n, ulonglong val)
   int i;
   int c;
   for (i = n; i > 0; --i) {
-    c = (val >> (8 * (i - 1))) & 0xff;
+    c = (int)((val >> (8 * (i - 1))) & 0xff); /* warning C4244: '=' : conversion from 'ulonglong' to 'int', possible loss of data */
     if (jas_stream_putc(out, c) == EOF)
       return -1;
   }