shithub: jbig2

Download patch

ref: bad2f808eed9cae57d030f76b3bb22f57618115e
parent: db6ba0ba18e02d73fcfcbdbddde043f8b841130f
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Tue Aug 6 07:15:29 EDT 2002

Add some casts to avoid MSVC warnings where it improves readability.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@181 ded80894-8fb9-0310-811b-c03f3676ab4d

--- a/jbig2_arith.c
+++ b/jbig2_arith.c
@@ -8,7 +8,7 @@
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    $Id: jbig2_arith.c,v 1.11 2002/07/20 17:23:15 giles Exp $
+    $Id: jbig2_arith.c,v 1.12 2002/08/06 11:15:29 giles Exp $
 */
 
 #ifdef HAVE_CONFIG_H
@@ -64,7 +64,7 @@
   /* invariant: as->next_word_bytes > 0 */
 
   /* Figure G.3 */
-  B = (as->next_word >> 24) & 0xFF;
+  B = (byte)((as->next_word >> 24) & 0xFF);
   if (B == 0xFF)
     {
       byte B1;
@@ -73,7 +73,7 @@
 	  Jbig2WordStream *ws = as->ws;
 	  as->next_word = ws->get_next_word (ws, as->offset);
 	  as->offset += 4;
-	  B1 = (as->next_word >> 24) & 0xFF;
+	  B1 = (byte)((as->next_word >> 24) & 0xFF);
 	  if (B1 > 0x8F)
 	    {
 #ifdef DEBUG
@@ -102,7 +102,7 @@
 	}
       else
 	{
-	  B1 = (as->next_word >> 16) & 0xFF;
+	  B1 = (byte)((as->next_word >> 16) & 0xFF);
 	  if (B1 > 0x8F)
 	    {
 #ifdef DEBUG
@@ -146,7 +146,7 @@
 	  as->offset += 4;
 	  as->next_word_bytes = 4;
 	}
-      B = (as->next_word >> 24) & 0xFF;
+      B = (byte)((as->next_word >> 24) & 0xFF);
 #ifdef SOFTWARE_CONVENTION
       as->C += 0xFF00 - (B << 8);
 #else