Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 84a5a692768079a7dd5ef8d15cf85699 > files > 4

BlockOutII-2.4-1mdv2010.0.src.rpm

--- BlockOutII/contrib/ImageLib/src/jpg/jpegdecoder.cpp.orig	2007-08-03 01:54:59.000000000 +1200
+++ BlockOutII/contrib/ImageLib/src/jpg/jpegdecoder.cpp	2009-09-11 23:09:54.420315341 +1200
@@ -22,6 +22,7 @@
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 //------------------------------------------------------------------------------
+#include <inttypes.h>
 #include "jpegdecoder.h"
 //------------------------------------------------------------------------------
 // Coefficients are stored in this sequence in the data stream.
@@ -106,7 +107,7 @@
   blocks[i] = q;
 
   // Round to qword boundry, to avoid misaligned accesses with MMX code
-  return ((void *)(((uint)q + 7) & ~7));
+  return ((void *)(((uintptr_t)q + 7) & ~7));
 }
 //------------------------------------------------------------------------------
 // Clear buffer to word values.
@@ -1884,7 +1885,7 @@
   q = (uchar *)alloc(max_blocks_per_row * 64 * sizeof(BLOCK_TYPE) + 8);
 
   // Align to 8-byte boundry, for MMX code
-  q = (uchar *)(((uint)q + 7) & ~7);
+  q = (uchar *)(((uintptr_t)q + 7) & ~7);
 
   // The block_seg[] array's name dates back to the
   // 16-bit assembler implementation. "seg" stood for "segment".
@@ -1894,7 +1895,7 @@
   for (i = 0; i < max_blocks_per_row; i++)
     block_max_zag_set[i] = 64;
 
-  Psample_buf = (uchar *)(((uint)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
+  Psample_buf = (uchar *)(((uintptr_t)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
 
   total_lines_left = image_y_size;