]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 29 Sep 2013 20:20:01 +0000 (20:20 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 29 Sep 2013 20:20:01 +0000 (20:20 +0000)
coders/tiff.c

index 3a811253db4f648a73bc59660a459cf8177c0ba8..c0a1006dc9f95e69c884b4f09a20db5a0e4617d4 100644 (file)
@@ -710,44 +710,40 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image,
       }
       case TIFF_SHORT:
       {
-        void
-          *shorty;
+        uint16
+          shorty;
 
-        shorty=(void *) NULL;
+        shorty=0;
         if (exif_info[i].variable_length != 0)
           {
-            shorty=(void *) NULL;
             if (TIFFGetField(tiff,exif_info[i].tag,&sans,&shorty,&sans) != 0)
-              (void) FormatLocaleString(value,MaxTextExtent,"%d",(int)
-                (*(uint16 *) shorty));
+              (void) FormatLocaleString(value,MaxTextExtent,"%d",shorty);
             break;
           }
         if (TIFFGetField(tiff,exif_info[i].tag,&shorty,&sans,&sans) != 0)
-          (void) FormatLocaleString(value,MaxTextExtent,"%d",(int)
-            (*(uint16 *) &shorty));
+          (void) FormatLocaleString(value,MaxTextExtent,"%d",shorty);
         break;
       }
       case TIFF_LONG:
       {
-        void
-          *longy;
+        uint32
+          longy;
 
-        longy=(void *) NULL;
+        longy=0;
         if (TIFFGetField(tiff,exif_info[i].tag,&longy,&sans,&sans) != 0)
-          (void) FormatLocaleString(value,MaxTextExtent,"%d",
-            (*(uint32 *) &longy));
+          (void) FormatLocaleString(value,MaxTextExtent,"%d",longy);
         break;
       }
 #if defined(TIFF_VERSION_BIG)
       case TIFF_LONG8:
       {
-        void
-          *longy;
+        uint64
+          longy;
 
-        longy=(void *) NULL;
+        longy=0;
         if (TIFFGetField(tiff,exif_info[i].tag,&longy,&sans,&sans) != 0)
           (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
-            ((MagickOffsetType) (*(uint64 *) &longy)));
+            ((MagickOffsetType) longy));
         break;
       }
 #endif
@@ -756,13 +752,12 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image,
       case TIFF_FLOAT:
       case TIFF_DOUBLE:
       {
-        void
-          *rational;
+        float
+          floaty;
 
-        rational=(void *) NULL;
-        if (TIFFGetField(tiff,exif_info[i].tag,&rational,&sans,&sans) != 0)
-          (void) FormatLocaleString(value,MaxTextExtent,"%g",
-            *((float *) &rational));
+        floaty=0.0;
+        if (TIFFGetField(tiff,exif_info[i].tag,&floaty,&sans,&sans) != 0)
+          (void) FormatLocaleString(value,MaxTextExtent,"%g",(double) floaty);
         break;
       }
       default: