]> granicus.if.org Git - imagemagick/commitdiff
Fixed compiler warning.
authordirk <dirk@git.imagemagick.org>
Mon, 18 Jul 2016 05:11:29 +0000 (07:11 +0200)
committerdirk <dirk@git.imagemagick.org>
Mon, 18 Jul 2016 05:11:29 +0000 (07:11 +0200)
MagickCore/type.c

index 9cb210f59a3d97e54daf43868015e72229aeb356..315b25a242dfccf70716d4e86e5011924470a9fe 100644 (file)
@@ -193,11 +193,11 @@ static SplayTreeInfo *AcquireTypeCache(const char *filename,
     status;
 
   SplayTreeInfo
-    *type_cache;
+    *cache;
 
-  type_cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
+  cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
     DestroyTypeNode);
-  if (type_cache == (SplayTreeInfo *) NULL)
+  if (cache == (SplayTreeInfo *) NULL)
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   status=MagickTrue;
 #if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
@@ -218,7 +218,7 @@ static SplayTreeInfo *AcquireTypeCache(const char *filename,
     while (option != (const StringInfo *) NULL)
     {
       (void) CopyMagickString(path,GetStringInfoPath(option),MagickPathExtent);
-      status&=LoadTypeCache(type_cache,(const char *)
+      status&=LoadTypeCache(cache,(const char *)
         GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
       option=(const StringInfo *) GetNextValueInLinkedList(options);
     }
@@ -237,16 +237,16 @@ static SplayTreeInfo *AcquireTypeCache(const char *filename,
         option=FileToString(path,~0UL,exception);
         if (option != (void *) NULL)
           {
-            status&=LoadTypeCache(type_cache,option,path,0,exception);
+            status&=LoadTypeCache(cache,option,path,0,exception);
             option=DestroyString(option);
           }
         font_path=DestroyString(font_path);
       }
   }
 #endif
-  if (GetNumberOfNodesInSplayTree(type_cache) == 0)
-    status&=LoadTypeCache(type_cache,TypeMap,"built-in",0,exception);
-  return(type_cache);
+  if (GetNumberOfNodesInSplayTree(cache) == 0)
+    status&=LoadTypeCache(cache,TypeMap,"built-in",0,exception);
+  return(cache);
 }
 \f
 /*
@@ -1014,9 +1014,8 @@ MagickExport MagickBooleanType ListTypeInfo(FILE *file,ExceptionInfo *exception)
 %
 %  The format of the LoadTypeCache method is:
 %
-%      MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
-%        const char *xml,const char *filename,const size_t depth,
-%        ExceptionInfo *exception)
+%      MagickBooleanType LoadTypeCache(SplayTreeInfo *cache,const char *xml,
+%        const char *filename,const size_t depth,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -1067,9 +1066,8 @@ static inline MagickBooleanType SetTypeNodePath(const char *filename,
   return(MagickTrue);
 }
 
-static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
-  const char *xml,const char *filename,const size_t depth,
-  ExceptionInfo *exception)
+static MagickBooleanType LoadTypeCache(SplayTreeInfo *cache,const char *xml,
+  const char *filename,const size_t depth,ExceptionInfo *exception)
 {
   char
     font_path[MagickPathExtent],
@@ -1174,8 +1172,7 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
                   sans_exception=DestroyExceptionInfo(sans_exception);
                   if (xml != (char *) NULL)
                     {
-                      status&=LoadTypeCache(type_cache,xml,path,depth+1,
-                        exception);
+                      status&=LoadTypeCache(cache,xml,path,depth+1,exception);
                       xml=(char *) RelinquishMagickMemory(xml);
                     }
                 }
@@ -1200,7 +1197,7 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *type_cache,
       continue;
     if (LocaleCompare(keyword,"/>") == 0)
       {
-        status=AddValueToSplayTree(type_cache,type_info->name,type_info);
+        status=AddValueToSplayTree(cache,type_info->name,type_info);
         if (status == MagickFalse)
           (void) ThrowMagickException(exception,GetMagickModule(),
             ResourceLimitError,"MemoryAllocationFailed","`%s'",type_info->name);