]> granicus.if.org Git - imagemagick/commitdiff
Fixed compiler warning.
authordirk <dirk@git.imagemagick.org>
Sun, 17 Jul 2016 16:59:02 +0000 (18:59 +0200)
committerdirk <dirk@git.imagemagick.org>
Sun, 17 Jul 2016 17:30:51 +0000 (19:30 +0200)
MagickCore/delegate.c
MagickCore/locale.c
MagickCore/mime.c

index 7fd5b4f8ea337a0cc74aaf6339bc4cab2d806db0..8edee1d516742eee14b6ebe77b7f909d6213995f 100644 (file)
@@ -179,13 +179,13 @@ static LinkedListInfo *AcquireDelegateCache(const char *filename,
   ExceptionInfo *exception)
 {
   LinkedListInfo
-    *delegate_cache;
+    *cache;
 
   MagickStatusType
     status;
 
-  delegate_cache=NewLinkedList(0);
-  if (delegate_cache == (LinkedListInfo *) NULL)
+  cache=NewLinkedList(0);
+  if (cache == (LinkedListInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   status=MagickTrue;
 #if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
@@ -200,17 +200,16 @@ static LinkedListInfo *AcquireDelegateCache(const char *filename,
     option=(const StringInfo *) GetNextValueInLinkedList(options);
     while (option != (const StringInfo *) NULL)
     {
-      status&=LoadDelegateCache(delegate_cache,(const char *)
+      status&=LoadDelegateCache(cache,(const char *)
         GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
       option=(const StringInfo *) GetNextValueInLinkedList(options);
     }
     options=DestroyConfigureOptions(options);
   }
 #endif
-  if (IsLinkedListEmpty(delegate_cache) != MagickFalse)
-    status&=LoadDelegateCache(delegate_cache,DelegateMap,"built-in",0,
-      exception);
-  return(delegate_cache);
+  if (IsLinkedListEmpty(cache) != MagickFalse)
+    status&=LoadDelegateCache(cache,DelegateMap,"built-in",0,exception);
+  return(cache);
 }
 \f
 /*
@@ -1975,7 +1974,7 @@ MagickExport MagickBooleanType ListDelegateInfo(FILE *file,
 %
 %  The format of the LoadDelegateCache method is:
 %
-%      MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
+%      MagickBooleanType LoadDelegateCache(LinkedListInfo *cache,
 %        const char *xml,const char *filename,const size_t depth,
 %        ExceptionInfo *exception)
 %
@@ -1990,7 +1989,7 @@ MagickExport MagickBooleanType ListDelegateInfo(FILE *file,
 %    o exception: return any errors or warnings in this structure.
 %
 */
-static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
+static MagickBooleanType LoadDelegateCache(LinkedListInfo *cache,
   const char *xml,const char *filename,const size_t depth,
   ExceptionInfo *exception)
 {
@@ -2082,7 +2081,7 @@ 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(cache,file_xml,path,
                         depth+1,exception);
                       file_xml=DestroyString(file_xml);
                     }
@@ -2110,7 +2109,7 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
       continue;
     if (LocaleCompare(keyword,"/>") == 0)
       {
-        status=AppendValueToLinkedList(delegate_cache,delegate_info);
+        status=AppendValueToLinkedList(cache,delegate_info);
         if (status == MagickFalse)
           (void) ThrowMagickException(exception,GetMagickModule(),
             ResourceLimitError,"MemoryAllocationFailed","`%s'",
index 4182bbed61d4c40991161b2a89e5741b6da145c8..9ee5ae7c656bd0c1a60157c620c52fad318c495b 100644 (file)
@@ -189,9 +189,9 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
     status;
 
   SplayTreeInfo
-    *locale_cache;
+    *cache;
 
-  locale_cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
+  cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
     DestroyLocaleNode);
   if (locale_cache == (SplayTreeInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
@@ -208,19 +208,19 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
     option=(const StringInfo *) GetNextValueInLinkedList(options);
     while (option != (const StringInfo *) NULL)
     {
-      status&=LoadLocaleCache(locale_cache,(const char *)
+      status&=LoadLocaleCache(cache,(const char *)
         GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,
         exception);
       option=(const StringInfo *) GetNextValueInLinkedList(options);
     }
     options=DestroyLocaleOptions(options);
-    if (GetNumberOfNodesInSplayTree(locale_cache) == 0)
+    if (GetNumberOfNodesInSplayTree(cache) == 0)
       {
         options=GetLocaleOptions("english.xml",exception);
         option=(const StringInfo *) GetNextValueInLinkedList(options);
         while (option != (const StringInfo *) NULL)
         {
-          status&=LoadLocaleCache(locale_cache,(const char *)
+          status&=LoadLocaleCache(cache,(const char *)
             GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,
             exception);
           option=(const StringInfo *) GetNextValueInLinkedList(options);
@@ -229,10 +229,10 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
       }
   }
 #endif
-  if (GetNumberOfNodesInSplayTree(locale_cache) == 0)
-    status&=LoadLocaleCache(locale_cache,LocaleMap,"built-in",locale,0,
+  if (GetNumberOfNodesInSplayTree(cache) == 0)
+    status&=LoadLocaleCache(cache,LocaleMap,"built-in",locale,0,
       exception);
-  return(locale_cache);
+  return(cache);
 }
 \f
 #if defined(MAGICKCORE_LOCALE_SUPPORT)
@@ -1094,9 +1094,8 @@ MagickExport MagickBooleanType ListLocaleInfo(FILE *file,
 %
 %  The format of the LoadLocaleCache method is:
 %
-%      MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
-%        const char *xml,const char *filename,const size_t depth,
-%        ExceptionInfo *exception)
+%      MagickBooleanType LoadLocaleCache(SplayTreeInfo *cache,const char *xml,
+%        const char *filename,const size_t depth,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -1149,9 +1148,8 @@ static void LocaleFatalErrorHandler(
   exit(1);
 }
 
-static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
-  const char *xml,const char *filename,const char *locale,const size_t depth,
-  ExceptionInfo *exception)
+static MagickBooleanType LoadLocaleCache(SplayTreeInfo *cache,const char *xml,
+  const char *filename,const char *locale,const size_t depth,ExceptionInfo *exception)
 {
   char
     keyword[MagickLocaleExtent],
@@ -1268,7 +1266,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
                   file_xml=FileToXML(path,~0UL);
                   if (file_xml != (char *) NULL)
                     {
-                      status&=LoadLocaleCache(locale_cache,file_xml,path,locale,
+                      status&=LoadLocaleCache(cache,file_xml,path,locale,
                         depth+1,exception);
                       file_xml=DestroyString(file_xml);
                     }
@@ -1336,7 +1334,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
         locale_info->tag=ConstantString(tag);
         locale_info->message=ConstantString(message);
         locale_info->signature=MagickCoreSignature;
-        status=AddValueToSplayTree(locale_cache,locale_info->tag,locale_info);
+        status=AddValueToSplayTree(cache,locale_info->tag,locale_info);
         if (status == MagickFalse)
           (void) ThrowMagickException(exception,GetMagickModule(),
             ResourceLimitError,"MemoryAllocationFailed","`%s'",
index 68dacff1f285e9c4f267152ec0dea3437487160c..5c1a6f753696b3ce13de270ab1436073947d27d0 100644 (file)
@@ -158,13 +158,13 @@ MagickExport LinkedListInfo *AcquireMimeCache(const char *filename,
   ExceptionInfo *exception)
 {
   LinkedListInfo
-    *mime_cache;
+    *cache;
 
   MagickStatusType
     status;
 
-  mime_cache=NewLinkedList(0);
-  if (mime_cache == (LinkedListInfo *) NULL)
+  cache=NewLinkedList(0);
+  if (cache == (LinkedListInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   status=MagickTrue;
 #if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
@@ -179,16 +179,16 @@ MagickExport LinkedListInfo *AcquireMimeCache(const char *filename,
     option=(const StringInfo *) GetNextValueInLinkedList(options);
     while (option != (const StringInfo *) NULL)
     {
-      status&=LoadMimeCache(mime_cache,(const char *)
+      status&=LoadMimeCache(cache,(const char *)
         GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
       option=(const StringInfo *) GetNextValueInLinkedList(options);
     }
     options=DestroyConfigureOptions(options);
   }
 #endif
-  if (IsLinkedListEmpty(mime_cache) != MagickFalse)
-    status&=LoadMimeCache(mime_cache,MimeMap,"built-in",0,exception);
-  return(mime_cache);
+  if (IsLinkedListEmpty(cache) != MagickFalse)
+    status&=LoadMimeCache(cache,MimeMap,"built-in",0,exception);
+  return(cache);
 }
 \f
 /*
@@ -775,9 +775,8 @@ MagickExport MagickBooleanType ListMimeInfo(FILE *file,ExceptionInfo *exception)
 %
 %  The format of the LoadMimeCache method is:
 %
-%      MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
-%        const char *xml,const char *filename,const size_t depth,
-%        ExceptionInfo *exception)
+%      MagickBooleanType LoadMimeCache(LinkedListInfo *cache,const char *xml,
+%        const char *filename,const size_t depth,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -790,9 +789,8 @@ MagickExport MagickBooleanType ListMimeInfo(FILE *file,ExceptionInfo *exception)
 %    o exception: return any errors or warnings in this structure.
 %
 */
-static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
-  const char *xml,const char *filename,const size_t depth,
-  ExceptionInfo *exception)
+static MagickBooleanType LoadMimeCache(LinkedListInfo *cache,const char *xml,
+  const char *filename,const size_t depth,ExceptionInfo *exception)
 {
   const char
     *attribute;
@@ -848,7 +846,7 @@ static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
             file_xml=FileToXML(path,~0UL);
             if (file_xml != (char *) NULL)
               {
-                status&=LoadMimeCache(mime_cache,file_xml,path,depth+1,exception);
+                status&=LoadMimeCache(cache,file_xml,path,depth+1,exception);
                 file_xml=DestroyString(file_xml);
               }
           }
@@ -961,7 +959,7 @@ static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
     attribute=GetXMLTreeAttribute(mime,"type");
     if (attribute != (const char *) NULL)
       mime_info->type=ConstantString(attribute);
-    status=AppendValueToLinkedList(mime_cache,mime_info);
+    status=AppendValueToLinkedList(cache,mime_info);
     if (status == MagickFalse)
       (void) ThrowMagickException(exception,GetMagickModule(),
         ResourceLimitError,"MemoryAllocationFailed","`%s'",filename);