]> granicus.if.org Git - imagemagick/commitdiff
Fixed compiler warning.
authordirk <dirk@git.imagemagick.org>
Fri, 27 Sep 2013 00:00:43 +0000 (00:00 +0000)
committerdirk <dirk@git.imagemagick.org>
Fri, 27 Sep 2013 00:00:43 +0000 (00:00 +0000)
coders/tiff.c

index e8503efbe6b21ff75ca9538101df706d1cd33fb9..c41485ecf40e3698c96c9301cfe976872ce97c5f 100644 (file)
@@ -725,7 +725,7 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image,
           }
         if (TIFFGetField(tiff,exif_info[i].tag,&shorty,&sans,&sans) != 0)
           (void) FormatLocaleString(value,MaxTextExtent,"%d",(int)
-            (uint16) shorty);
+            (*(uint16 *) &shorty));
         break;
       }
       case TIFF_LONG:
@@ -734,7 +734,8 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image,
           *longy;
 
         if (TIFFGetField(tiff,exif_info[i].tag,&longy,&sans,&sans) != 0)
-          (void) FormatLocaleString(value,MaxTextExtent,"%d", (uint32) longy);
+          (void) FormatLocaleString(value,MaxTextExtent,"%d",
+            (*(uint32 *) &longy));
         break;
       }
 #if defined(TIFF_VERSION_BIG)
@@ -745,7 +746,7 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image,
 
         if (TIFFGetField(tiff,exif_info[i].tag,&longy,&sans,&sans) != 0)
           (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
-            ((MagickOffsetType) (uint64) longy));
+            ((MagickOffsetType) (*(uint64 *) &longy)));
         break;
       }
 #endif