]> granicus.if.org Git - imagemagick/commitdiff
Fixed various warnings reported by Visual Studio 2015 and did some minor refactoring.
authordirk <dirk@git.imagemagick.org>
Tue, 20 Oct 2015 21:01:53 +0000 (23:01 +0200)
committerdirk <dirk@git.imagemagick.org>
Tue, 20 Oct 2015 21:01:53 +0000 (23:01 +0200)
MagickCore/coder.c
MagickCore/color.c
MagickCore/configure.c
MagickCore/delegate.c
MagickCore/locale.c
MagickCore/log.c
MagickCore/magic.c
MagickCore/mime.c
MagickCore/policy.c
MagickCore/xml-tree.c

index 8a09bc8d7c33cbc6f015770fa79a6e1329edea75..32a15ffb5547439e450d8a5272eb768594ac1999 100644 (file)
@@ -875,7 +875,7 @@ static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
                 {
                   char
                     path[MagickPathExtent],
-                    *fileXml;
+                    *file_xml;
 
                   GetPathComponent(filename,HeadPath,path);
                   if (*path != '\0')
@@ -885,12 +885,12 @@ static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
                     (void) CopyMagickString(path,token,MagickPathExtent);
                   else
                     (void) ConcatenateMagickString(path,token,MagickPathExtent);
-                  fileXml=FileToXML(path,~0UL);
-                  if (fileXml != (char *) NULL)
+                  file_xml=FileToXML(path,~0UL);
+                  if (file_xml != (char *) NULL)
                     {
-                      status&=LoadCoderCache(coder_cache,fileXml,path,depth+1,
+                      status&=LoadCoderCache(coder_cache,file_xml,path,depth+1,
                         exception);
-                      fileXml=(char *) RelinquishMagickMemory(fileXml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index 7ee846edc9185fcf525db6c2ae71a7aad4c81344..d77f24ae2ae35812845b165503e29a948c24e9be 100644 (file)
@@ -2049,7 +2049,7 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *color_cache,
                 {
                   char
                     path[MagickPathExtent],
-                    *fileXml;
+                    *file_xml;
 
                   GetPathComponent(filename,HeadPath,path);
                   if (*path != '\0')
@@ -2059,12 +2059,12 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *color_cache,
                     (void) CopyMagickString(path,token,MagickPathExtent);
                   else
                     (void) ConcatenateMagickString(path,token,MagickPathExtent);
-                  fileXml=FileToXML(path,~0UL);
-                  if (fileXml != (char *) NULL)
+                  file_xml=FileToXML(path,~0UL);
+                  if (file_xml != (char *) NULL)
                     {
-                      status&=LoadColorCache(color_cache,fileXml,path,depth+1,
+                      status&=LoadColorCache(color_cache,file_xml,path,depth+1,
                         exception);
-                      fileXml=(char *) RelinquishMagickMemory(fileXml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index d51e227ae7837eda7dabe5e1898456f47e82f6ba..3671488c660918111870525dbcef2a9765f8b65a 100755 (executable)
@@ -1208,7 +1208,7 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *configure_cache,
                 {
                   char
                     path[MagickPathExtent],
-                    *fileXml;
+                    *file_xml;
 
                   GetPathComponent(filename,HeadPath,path);
                   if (*path != '\0')
@@ -1218,12 +1218,12 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *configure_cache,
                     (void) CopyMagickString(path,token,MagickPathExtent);
                   else
                     (void) ConcatenateMagickString(path,token,MagickPathExtent);
-                  fileXml=FileToXML(path,~0UL);
-                  if (fileXml != (char *) NULL)
+                  file_xml=FileToXML(path,~0UL);
+                  if (file_xml != (char *) NULL)
                     {
-                      status&=LoadConfigureCache(configure_cache,fileXml,path,
+                      status&=LoadConfigureCache(configure_cache,file_xml,path,
                         depth+1,exception);
-                      fileXml=(char *) RelinquishMagickMemory(fileXml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index 8047042be4aa56b3ceacb52d31701a621bb32506..dffd6ba362391c9c897353cf09716b84d0b5c324 100644 (file)
@@ -1574,9 +1574,9 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
                   file_xml=FileToXML(path,~0UL);
                   if (file_xml != (char *) NULL)
                     {
-                      status&=LoadDelegateCache(delegate_cache, file_xml,path,
+                      status&=LoadDelegateCache(delegate_cache,file_xml,path,
                         depth+1,exception);
-                      file_xml=(char *) RelinquishMagickMemory(file_xml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index 5dc8c6de6006794ec7fdec0491c6f43703f11e7e..ae5f1e28d229af0993580a560bce911f96eabb6b 100644 (file)
@@ -1248,7 +1248,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
                 {
                   char
                     path[MagickPathExtent],
-                    *xml;
+                    *file_xml;
 
                   *path='\0';
                   GetPathComponent(filename,HeadPath,path);
@@ -1259,12 +1259,12 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
                     (void) CopyMagickString(path,token,MagickPathExtent);
                   else
                     (void) ConcatenateMagickString(path,token,MagickPathExtent);
-                  xml=FileToXML(path,~0UL);
-                  if (xml != (char *) NULL)
+                  file_xml=FileToXML(path,~0UL);
+                  if (file_xml != (char *) NULL)
                     {
-                      status&=LoadLocaleCache(locale_cache,xml,path,locale,
+                      status&=LoadLocaleCache(locale_cache,file_xml,path,locale,
                         depth+1,exception);
-                      xml=(char *) RelinquishMagickMemory(xml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index 673fb50104bbbc0b05693943a89abe98d1ea9edb..eacd775d2da8edd2947412b5972afa1f0e321136 100644 (file)
@@ -1492,7 +1492,7 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *log_cache,const char *xml,
                 {
                   char
                     path[MagickPathExtent],
-                    *xml;
+                    *file_xml;
 
                   GetPathComponent(filename,HeadPath,path);
                   if (*path != '\0')
@@ -1502,12 +1502,12 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *log_cache,const char *xml,
                     (void) CopyMagickString(path,token,MagickPathExtent);
                   else
                     (void) ConcatenateMagickString(path,token,MagickPathExtent);
-                  xml=FileToXML(path,~0UL);
-                  if (xml != (char *) NULL)
+                  file_xml=FileToXML(path,~0UL);
+                  if (file_xml != (char *) NULL)
                     {
-                      status&=LoadLogCache(log_cache,xml,path,depth+1,
+                      status&=LoadLogCache(log_cache,file_xml,path,depth+1,
                         exception);
-                      xml=DestroyString(xml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index 299e424c7cc5a14c8625f2610b3b29d9feff1dc3..14d03f22920016d6d6f8ec4a3fcc33e3349aa5e5 100644 (file)
@@ -898,7 +898,7 @@ static MagickBooleanType LoadMagicCache(LinkedListInfo *magic_cache,
                 {
                   char
                     path[MagickPathExtent],
-                    *xml;
+                    *file_xml;
 
                   GetPathComponent(filename,HeadPath,path);
                   if (*path != '\0')
@@ -908,12 +908,12 @@ static MagickBooleanType LoadMagicCache(LinkedListInfo *magic_cache,
                     (void) CopyMagickString(path,token,MagickPathExtent);
                   else
                     (void) ConcatenateMagickString(path,token,MagickPathExtent);
-                  xml=FileToXML(path,~0UL);
+                  file_xml=FileToXML(path,~0UL);
                   if (xml != (char *) NULL)
                     {
-                      status&=LoadMagicCache(magic_cache,xml,path,depth+1,
+                      status&=LoadMagicCache(magic_cache,file_xml,path,depth+1,
                         exception);
-                      xml=(char *) RelinquishMagickMemory(xml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index 865ad21c56ff2b038199c33e98a00bbbedcdb9fb..430b95bdf898b54f27d89b8d4bf3c3d58b2c3570 100644 (file)
@@ -835,7 +835,7 @@ static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
           {
             char
               path[MagickPathExtent],
-              *xml;
+              *file_xml;
 
             GetPathComponent(filename,HeadPath,path);
             if (*path != '\0')
@@ -845,11 +845,11 @@ static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
               (void) CopyMagickString(path,attribute,MagickPathExtent);
             else
               (void) ConcatenateMagickString(path,attribute,MagickPathExtent);
-            xml=FileToXML(path,~0UL);
-            if (xml != (char *) NULL)
+            file_xml=FileToXML(path,~0UL);
+            if (file_xml != (char *) NULL)
               {
-                status&=LoadMimeCache(mime_cache,xml,path,depth+1,exception);
-                xml=DestroyString(xml);
+                status&=LoadMimeCache(mime_cache,file_xml,path,depth+1,exception);
+                file_xml=DestroyString(file_xml);
               }
           }
       }
index f3d1be3d1f6e00fa307dc1c2a0ccc77346543a33..7f0ac5fedcecc286841c7d4193ab48a84fcc19c5 100644 (file)
@@ -806,7 +806,7 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *policy_cache,
                 {
                   char
                     path[MagickPathExtent],
-                    *xml;
+                    *file_xml;
 
                   GetPathComponent(filename,HeadPath,path);
                   if (*path != '\0')
@@ -816,12 +816,12 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *policy_cache,
                     (void) CopyMagickString(path,token,MagickPathExtent);
                   else
                     (void) ConcatenateMagickString(path,token,MagickPathExtent);
-                  xml=FileToXML(path,~0UL);
-                  if (xml != (char *) NULL)
+                  file_xml=FileToXML(path,~0UL);
+                  if (file_xml != (char *) NULL)
                     {
-                      status&=LoadPolicyCache(policy_cache,xml,path,depth+1,
+                      status&=LoadPolicyCache(policy_cache,file_xml,path,depth+1,
                         exception);
-                      xml=(char *) RelinquishMagickMemory(xml);
+                      file_xml=DestroyString(file_xml);
                     }
                 }
             }
index d189070128f5a46540ea16f291a0b701cd91d757..6689424285526bf95b4437947ee6ba512215d8a9 100644 (file)
@@ -1483,13 +1483,15 @@ static char *ParseEntities(char *xml,char **entities,int state)
                     else
                       {
                         char
-                          *xml;
+                          *extent_xml;
 
-                        xml=(char *) AcquireQuantumMemory(extent,sizeof(*xml));
-                        if (xml != (char *) NULL)
+                        extent_xml=(char *) AcquireQuantumMemory(extent,
+                          sizeof(*extent_xml));
+                        if (extent_xml != (char *) NULL)
                           {
-                            (void) CopyMagickString(xml,p,extent*sizeof(*xml));
-                            p=xml;
+                            (void) CopyMagickString(extent_xml,p,extent*
+                              sizeof(*extent_xml));
+                            p= extent_xml;
                           }
                       }
                     if (p == (char *) NULL)