diff --git a/coders/cin.c b/coders/cin.c
index e9f055a..22462da 100644
--- a/coders/cin.c
+++ b/coders/cin.c
@@ -1028,12 +1028,12 @@
   value=GetCINProperty(image_info,image,"cin:origination.x_offset");
   if (value != (const char *) NULL)
     cin.origination.x_offset=StringToLong(value);
-  offset+=WriteBlobLong(image,(size_t) cin.origination.x_offset);
+  offset+=WriteBlobLong(image,(unsigned int) cin.origination.x_offset);
   cin.origination.y_offset=0UL;
   value=GetCINProperty(image_info,image,"cin:origination.y_offset");
   if (value != (const char *) NULL)
     cin.origination.y_offset=StringToLong(value);
-  offset+=WriteBlobLong(image,(size_t) cin.origination.y_offset);
+  offset+=WriteBlobLong(image,(unsigned int) cin.origination.y_offset);
   value=GetCINProperty(image_info,image,"cin:origination.filename");
   if (value != (const char *) NULL)
     (void) CopyMagickString(cin.origination.filename,value,
diff --git a/coders/meta.c b/coders/meta.c
index f48eefb..cc4341d 100644
--- a/coders/meta.c
+++ b/coders/meta.c
@@ -419,7 +419,7 @@
                     offset=SeekBlob(ofile,savedpos,SEEK_SET);
                     if (offset < 0)
                       return(-1);
-                    (void) WriteBlobMSBLong(ofile,(size_t) diff);
+                    (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
                     offset=SeekBlob(ofile,currentpos,SEEK_SET);
                     if (offset < 0)
                       return(-1);
@@ -447,7 +447,7 @@
                   }
                 if (recnum != IPTC_ID)
                   {
-                    (void) WriteBlobMSBLong(ofile, (size_t) len);
+                    (void) WriteBlobMSBLong(ofile, (unsigned int) len);
                     outputlen += 4;
 
                     next=0;
@@ -465,7 +465,7 @@
                   {
                     /* patch in a fake length for now and fix it later */
                     savedpos = TellBlob(ofile);
-                    (void) WriteBlobMSBLong(ofile,0xFFFFFFFFUL);
+                    (void) WriteBlobMSBLong(ofile,0xFFFFFFFFU);
                     outputlen += 4;
                     savedolen = outputlen;
                   }
@@ -506,7 +506,7 @@
       offset=SeekBlob(ofile,savedpos,SEEK_SET);
       if (offset < 0)
         return(-1);
-      (void) WriteBlobMSBLong(ofile,(size_t) diff);
+      (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
       offset=SeekBlob(ofile,currentpos,SEEK_SET);
       if (offset < 0)
         return(-1);
@@ -695,7 +695,7 @@
                     offset=SeekBlob(ofile,savedpos,SEEK_SET);
                     if (offset < 0)
                       return(-1);
-                    (void) WriteBlobMSBLong(ofile,(size_t) diff);
+                    (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
                     offset=SeekBlob(ofile,currentpos,SEEK_SET);
                     if (offset < 0)
                       return(-1);
@@ -723,7 +723,7 @@
                   }
                 if (recnum != IPTC_ID)
                   {
-                    (void) WriteBlobMSBLong(ofile,(size_t) len);
+                    (void) WriteBlobMSBLong(ofile,(unsigned int) len);
                     outputlen += 4;
 
                     next=0;
@@ -741,7 +741,7 @@
                   {
                     /* patch in a fake length for now and fix it later */
                     savedpos = TellBlob(ofile);
-                    (void) WriteBlobMSBLong(ofile,0xFFFFFFFFUL);
+                    (void) WriteBlobMSBLong(ofile,0xFFFFFFFFU);
                     outputlen += 4;
                     savedolen = outputlen;
                   }
@@ -781,7 +781,7 @@
       offset=SeekBlob(ofile,savedpos,SEEK_SET);
       if (offset < 0)
         return(-1);
-      (void) WriteBlobMSBLong(ofile,(size_t) diff);
+      (void) WriteBlobMSBLong(ofile,(unsigned int) diff);
       offset=SeekBlob(ofile,currentpos,SEEK_SET);
       if (offset < 0)
         return(-1);
diff --git a/coders/palm.c b/coders/palm.c
index d73d1d9..4744945 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -439,8 +439,12 @@
           }
         else
           if (compressionType == PALM_COMPRESSION_SCANLINE)
-            {  
+            {
+              size_t
+                one;
+
               /* TODO move out of loop! */
+              one=1;
               image->compression=FaxCompression;
               for (i=0; i < (ssize_t) bytes_per_row; i+=8)
               {
@@ -448,7 +452,7 @@
                 byte=1UL*MagickMin((ssize_t) bytes_per_row-i,8);
                 for (bit=0; bit < byte; bit++)
                 {
-                  if ((y == 0) || (count & (1 << (7 - bit))))
+                  if ((y == 0) || (count & (one << (7 - bit))))
                     one_row[i+bit]=(unsigned char) ReadBlobByte(image);
                   else
                     one_row[i+bit]=lastrow[i+bit];
diff --git a/coders/pcl.c b/coders/pcl.c
index 2c6427e..0827243 100644
--- a/coders/pcl.c
+++ b/coders/pcl.c
@@ -688,7 +688,8 @@
     *previous_pixels;
 
   size_t
-    density;
+    density,
+    one;
 
   /*
     Open output image file.
@@ -712,6 +713,7 @@
       density=(size_t) geometry.rho;
     }
   scene=0;
+  one=1;
   do
   {
     if (image->colorspace != RGBColorspace)
@@ -783,7 +785,8 @@
               ScaleQuantumToChar(image->colormap[i].blue),(double) i);
             (void) WriteBlobString(image,buffer);
           }
-          for ( ; i < (1L << bits_per_pixel); i++)
+          one=1;
+          for ( ; i < (ssize_t) (one << bits_per_pixel); i++)
           {
             (void) FormatMagickString(buffer,MaxTextExtent,"\033*v%.20gI",
               (double) i);
diff --git a/coders/pdb.c b/coders/pdb.c
index 79d4c83..06f7445 100644
--- a/coders/pdb.c
+++ b/coders/pdb.c
@@ -827,7 +827,7 @@
   quantum_info=AcquireQuantumInfo(image_info,image);
   if (quantum_info == (QuantumInfo *) NULL)
     ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
-  bits=8/(ssize_t) bits_per_pixel-1;  /* start at most significant bits */
+  bits=8/(int) bits_per_pixel-1;  /* start at most significant bits */
   literal=0;
   repeat=0;
   q=runlength;
@@ -882,7 +882,7 @@
                   literal-=0x80;
                 }
             }
-        bits=8/(ssize_t) bits_per_pixel-1;
+        bits=8/(int) bits_per_pixel-1;
         buffer[literal+repeat]=0x00;
       }
     }
diff --git a/coders/png.c b/coders/png.c
index bfb0010..a51f64a 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -2206,7 +2206,7 @@
         (void) LogMagickEvent(CoderEvent,GetMagickModule(),
           "    Reading PNG tRNS chunk.");
 
-      max_sample = (one << ping_bit_depth) - 1;
+      max_sample = (int) ((one << ping_bit_depth) - 1);
 
       if ((ping_color_type == PNG_COLOR_TYPE_GRAY &&
           (int)ping_trans_color->gray > max_sample) ||
diff --git a/coders/sgi.c b/coders/sgi.c
index e0abc67..074f8d6 100644
--- a/coders/sgi.c
+++ b/coders/sgi.c
@@ -1097,7 +1097,7 @@
           Write out line start and length tables and runlength-encoded pixels.
         */
         for (i=0; i < (ssize_t) (iris_info.rows*iris_info.depth); i++)
-          (void) WriteBlobMSBLong(image,(size_t) offsets[i]);
+          (void) WriteBlobMSBLong(image,(unsigned int) offsets[i]);
         for (i=0; i < (ssize_t) (iris_info.rows*iris_info.depth); i++)
           (void) WriteBlobMSBLong(image,(unsigned int) runlength[i]);
         (void) WriteBlob(image,number_packets,packets);
diff --git a/coders/sun.c b/coders/sun.c
index 8dc3a32..727ef1c 100644
--- a/coders/sun.c
+++ b/coders/sun.c
@@ -788,8 +788,8 @@
           sun_info.depth=1;
           sun_info.length=(unsigned int) (((image->columns+7) >> 3)*
             image->rows);
-          sun_info.length+=((image->columns/8)+(image->columns % 8 ? 1 : 0)) %
-            2 ? image->rows : 0;
+          sun_info.length+=(unsigned int) (((image->columns/8)+(image->columns %
+            8 ? 1 : 0)) % 2 ? image->rows : 0);
         }
       else
         {
@@ -798,7 +798,8 @@
           */
           sun_info.depth=8;
           sun_info.length=(unsigned int) number_pixels;
-          sun_info.length+=image->columns & 0x01 ? image->rows : 0;
+          sun_info.length+=(unsigned int) (image->columns & 0x01 ? image->rows :
+            0);
           sun_info.maptype=RMT_EQUAL_RGB;
           sun_info.maplength=(unsigned int) (3*image->colors);
         }
diff --git a/coders/tga.c b/coders/tga.c
index fa23ceb..3d31bee 100644
--- a/coders/tga.c
+++ b/coders/tga.c
@@ -250,7 +250,11 @@
           image->colors=tga_info.colormap_length;
         else
           {
-            image->colors=0x01U << tga_info.bits_per_pixel;
+            size_t
+              one;
+
+            one=1;
+            image->colors=one << tga_info.bits_per_pixel;
             if (AcquireImageColormap(image,image->colors) == MagickFalse)
               ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
           }