]> granicus.if.org Git - libjpeg-turbo/commitdiff
Eliminate compiler warnings w/ Solaris Studio
authorDRC <information@libjpeg-turbo.org>
Sat, 31 Mar 2018 18:51:31 +0000 (13:51 -0500)
committerDRC <information@libjpeg-turbo.org>
Sat, 31 Mar 2018 19:03:37 +0000 (14:03 -0500)
jcarith.c
simd/i386/jsimd.c
simd/x86_64/jsimd.c
tjunittest.c
turbojpeg.c

index a16f45d2bdee2742e5f0712fe27ef367ffcb446c..c55c0eac5a7f0d09c951e32e6bc6d4da02872b3a 100644 (file)
--- a/jcarith.c
+++ b/jcarith.c
@@ -4,7 +4,7 @@
  * This file was part of the Independent JPEG Group's software:
  * Developed 1997-2009 by Guido Vollbeding.
  * libjpeg-turbo Modifications:
- * Copyright (C) 2015, D. R. Commander.
+ * Copyright (C) 2015, 2018, D. R. Commander.
  * For conditions of distribution and use, see the accompanying README.ijg
  * file.
  *
@@ -142,13 +142,13 @@ finish_pass(j_compress_ptr cinfo)
 
   /* Find the e->c in the coding interval with the largest
    * number of trailing zero bits */
-  if ((temp = (e->a - 1 + e->c) & 0xFFFF0000L) < e->c)
+  if ((temp = (e->a - 1 + e->c) & 0xFFFF0000UL) < e->c)
     e->c = temp + 0x8000L;
   else
     e->c = temp;
   /* Send remaining bytes to output */
   e->c <<= e->ct;
-  if (e->c & 0xF8000000L) {
+  if (e->c & 0xF8000000UL) {
     /* One final overflow has to be handled */
     if (e->buffer >= 0) {
       if (e->zc)
index 9434bb0b8439605d3d63b370fb14290be127ee10..0b5a410ab3dd9e249b83b5400d0f1d8996e4a3f4 100644 (file)
@@ -32,7 +32,7 @@
 #define IS_ALIGNED_SSE(ptr)  (IS_ALIGNED(ptr, 4)) /* 16 byte alignment */
 #define IS_ALIGNED_AVX(ptr)  (IS_ALIGNED(ptr, 5)) /* 32 byte alignment */
 
-static unsigned int simd_support = ~0;
+static unsigned int simd_support = (unsigned int)(~0);
 static unsigned int simd_huffman = 1;
 
 /*
index 6ec5f64e66319a8fe6f85220a856c8750de73781..7927875433bc6d6d2ed2ae9ccd090ea98cff7b71 100644 (file)
@@ -32,7 +32,7 @@
 #define IS_ALIGNED_SSE(ptr)  (IS_ALIGNED(ptr, 4)) /* 16 byte alignment */
 #define IS_ALIGNED_AVX(ptr)  (IS_ALIGNED(ptr, 5)) /* 32 byte alignment */
 
-static unsigned int simd_support = ~0;
+static unsigned int simd_support = (unsigned int)(~0);
 static unsigned int simd_huffman = 1;
 
 /*
index ed4bc6bb5b2964f8514b663a7c1ab8d74f583df5..26a16bc2fb65f2c01b7d8672b43672519033a045 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C)2009-2014, 2017 D. R. Commander.  All Rights Reserved.
+ * Copyright (C)2009-2014, 2017-2018 D. R. Commander.  All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -61,14 +61,14 @@ void usage(char *progName)
 
 #define _throwtj() { \
   printf("TurboJPEG ERROR:\n%s\n", tjGetErrorStr()); \
-  bailout(); \
+  bailout() \
 }
 #define _tj(f) { if ((f) == -1) _throwtj(); }
-#define _throw(m) { printf("ERROR: %s\n", m);  bailout(); }
+#define _throw(m) { printf("ERROR: %s\n", m);  bailout() }
 #define _throwmd5(filename, md5sum, ref) { \
   printf("\n%s has an MD5 sum of %s.\n   Should be %s.\n", filename, md5sum, \
          ref); \
-  bailout(); \
+  bailout() \
 }
 
 const char *subNameLong[TJ_NUMSAMP] = {
@@ -348,7 +348,7 @@ void writeJPEG(unsigned char *jpegBuf, unsigned long jpegSize, char *filename)
 
   if (!file || fwrite(jpegBuf, jpegSize, 1, file) != 1) {
     printf("ERROR: Could not write to %s.\n%s\n", filename, strerror(errno));
-    bailout();
+    bailout()
   }
 
 bailout:
index 472cd9d621f72aa5637f940e939c5b763b57a161..2ecd9e7b0bd0843105969a3db697da157ae96cbd 100644 (file)
@@ -168,7 +168,7 @@ static int cs2pf[JPEG_NUMCS] = {
 }
 #define _throw(m) { \
   snprintf(this->errStr, JMSG_LENGTH_MAX, "%s", m); \
-  this->isInstanceError = TRUE;  _throwg(m); \
+  this->isInstanceError = TRUE;  _throwg(m) \
 }
 
 #define getinstance(handle) \