From: dirk Date: Mon, 18 Jul 2016 05:11:29 +0000 (+0200) Subject: Fixed compiler warning. X-Git-Tag: 7.0.2-5~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13edaa7c7083b47439673c2fb90c9b4e9ceb7ad5;p=imagemagick Fixed compiler warning. --- diff --git a/MagickCore/type.c b/MagickCore/type.c index 9cb210f59..315b25a24 100644 --- a/MagickCore/type.c +++ b/MagickCore/type.c @@ -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); } /* @@ -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);