Skip to content

Commit c9f5cc8

Browse files
author
dirk
committed
Fixed compiler warning.
1 parent d673a21 commit c9f5cc8

File tree

3 files changed

+38
-43
lines changed

3 files changed

+38
-43
lines changed

MagickCore/delegate.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ static LinkedListInfo *AcquireDelegateCache(const char *filename,
179179
ExceptionInfo *exception)
180180
{
181181
LinkedListInfo
182-
*delegate_cache;
182+
*cache;
183183

184184
MagickStatusType
185185
status;
186186

187-
delegate_cache=NewLinkedList(0);
188-
if (delegate_cache == (LinkedListInfo *) NULL)
187+
cache=NewLinkedList(0);
188+
if (cache == (LinkedListInfo *) NULL)
189189
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
190190
status=MagickTrue;
191191
#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
@@ -200,17 +200,16 @@ static LinkedListInfo *AcquireDelegateCache(const char *filename,
200200
option=(const StringInfo *) GetNextValueInLinkedList(options);
201201
while (option != (const StringInfo *) NULL)
202202
{
203-
status&=LoadDelegateCache(delegate_cache,(const char *)
203+
status&=LoadDelegateCache(cache,(const char *)
204204
GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
205205
option=(const StringInfo *) GetNextValueInLinkedList(options);
206206
}
207207
options=DestroyConfigureOptions(options);
208208
}
209209
#endif
210-
if (IsLinkedListEmpty(delegate_cache) != MagickFalse)
211-
status&=LoadDelegateCache(delegate_cache,DelegateMap,"built-in",0,
212-
exception);
213-
return(delegate_cache);
210+
if (IsLinkedListEmpty(cache) != MagickFalse)
211+
status&=LoadDelegateCache(cache,DelegateMap,"built-in",0,exception);
212+
return(cache);
214213
}
215214

216215
/*
@@ -1975,7 +1974,7 @@ MagickExport MagickBooleanType ListDelegateInfo(FILE *file,
19751974
%
19761975
% The format of the LoadDelegateCache method is:
19771976
%
1978-
% MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
1977+
% MagickBooleanType LoadDelegateCache(LinkedListInfo *cache,
19791978
% const char *xml,const char *filename,const size_t depth,
19801979
% ExceptionInfo *exception)
19811980
%
@@ -1990,7 +1989,7 @@ MagickExport MagickBooleanType ListDelegateInfo(FILE *file,
19901989
% o exception: return any errors or warnings in this structure.
19911990
%
19921991
*/
1993-
static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
1992+
static MagickBooleanType LoadDelegateCache(LinkedListInfo *cache,
19941993
const char *xml,const char *filename,const size_t depth,
19951994
ExceptionInfo *exception)
19961995
{
@@ -2082,7 +2081,7 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
20822081
file_xml=FileToXML(path,~0UL);
20832082
if (file_xml != (char *) NULL)
20842083
{
2085-
status&=LoadDelegateCache(delegate_cache,file_xml,path,
2084+
status&=LoadDelegateCache(cache,file_xml,path,
20862085
depth+1,exception);
20872086
file_xml=DestroyString(file_xml);
20882087
}
@@ -2110,7 +2109,7 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *delegate_cache,
21102109
continue;
21112110
if (LocaleCompare(keyword,"/>") == 0)
21122111
{
2113-
status=AppendValueToLinkedList(delegate_cache,delegate_info);
2112+
status=AppendValueToLinkedList(cache,delegate_info);
21142113
if (status == MagickFalse)
21152114
(void) ThrowMagickException(exception,GetMagickModule(),
21162115
ResourceLimitError,"MemoryAllocationFailed","`%s'",

MagickCore/locale.c

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
189189
status;
190190

191191
SplayTreeInfo
192-
*locale_cache;
192+
*cache;
193193

194-
locale_cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
194+
cache=NewSplayTree(CompareSplayTreeString,(void *(*)(void *)) NULL,
195195
DestroyLocaleNode);
196196
if (locale_cache == (SplayTreeInfo *) NULL)
197197
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
@@ -208,19 +208,19 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
208208
option=(const StringInfo *) GetNextValueInLinkedList(options);
209209
while (option != (const StringInfo *) NULL)
210210
{
211-
status&=LoadLocaleCache(locale_cache,(const char *)
211+
status&=LoadLocaleCache(cache,(const char *)
212212
GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,
213213
exception);
214214
option=(const StringInfo *) GetNextValueInLinkedList(options);
215215
}
216216
options=DestroyLocaleOptions(options);
217-
if (GetNumberOfNodesInSplayTree(locale_cache) == 0)
217+
if (GetNumberOfNodesInSplayTree(cache) == 0)
218218
{
219219
options=GetLocaleOptions("english.xml",exception);
220220
option=(const StringInfo *) GetNextValueInLinkedList(options);
221221
while (option != (const StringInfo *) NULL)
222222
{
223-
status&=LoadLocaleCache(locale_cache,(const char *)
223+
status&=LoadLocaleCache(cache,(const char *)
224224
GetStringInfoDatum(option),GetStringInfoPath(option),locale,0,
225225
exception);
226226
option=(const StringInfo *) GetNextValueInLinkedList(options);
@@ -229,10 +229,10 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
229229
}
230230
}
231231
#endif
232-
if (GetNumberOfNodesInSplayTree(locale_cache) == 0)
233-
status&=LoadLocaleCache(locale_cache,LocaleMap,"built-in",locale,0,
232+
if (GetNumberOfNodesInSplayTree(cache) == 0)
233+
status&=LoadLocaleCache(cache,LocaleMap,"built-in",locale,0,
234234
exception);
235-
return(locale_cache);
235+
return(cache);
236236
}
237237

238238
#if defined(MAGICKCORE_LOCALE_SUPPORT)
@@ -1094,9 +1094,8 @@ MagickExport MagickBooleanType ListLocaleInfo(FILE *file,
10941094
%
10951095
% The format of the LoadLocaleCache method is:
10961096
%
1097-
% MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
1098-
% const char *xml,const char *filename,const size_t depth,
1099-
% ExceptionInfo *exception)
1097+
% MagickBooleanType LoadLocaleCache(SplayTreeInfo *cache,const char *xml,
1098+
% const char *filename,const size_t depth,ExceptionInfo *exception)
11001099
%
11011100
% A description of each parameter follows:
11021101
%
@@ -1149,9 +1148,8 @@ static void LocaleFatalErrorHandler(
11491148
exit(1);
11501149
}
11511150

1152-
static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
1153-
const char *xml,const char *filename,const char *locale,const size_t depth,
1154-
ExceptionInfo *exception)
1151+
static MagickBooleanType LoadLocaleCache(SplayTreeInfo *cache,const char *xml,
1152+
const char *filename,const char *locale,const size_t depth,ExceptionInfo *exception)
11551153
{
11561154
char
11571155
keyword[MagickLocaleExtent],
@@ -1268,7 +1266,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
12681266
file_xml=FileToXML(path,~0UL);
12691267
if (file_xml != (char *) NULL)
12701268
{
1271-
status&=LoadLocaleCache(locale_cache,file_xml,path,locale,
1269+
status&=LoadLocaleCache(cache,file_xml,path,locale,
12721270
depth+1,exception);
12731271
file_xml=DestroyString(file_xml);
12741272
}
@@ -1336,7 +1334,7 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *locale_cache,
13361334
locale_info->tag=ConstantString(tag);
13371335
locale_info->message=ConstantString(message);
13381336
locale_info->signature=MagickCoreSignature;
1339-
status=AddValueToSplayTree(locale_cache,locale_info->tag,locale_info);
1337+
status=AddValueToSplayTree(cache,locale_info->tag,locale_info);
13401338
if (status == MagickFalse)
13411339
(void) ThrowMagickException(exception,GetMagickModule(),
13421340
ResourceLimitError,"MemoryAllocationFailed","`%s'",

MagickCore/mime.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ MagickExport LinkedListInfo *AcquireMimeCache(const char *filename,
158158
ExceptionInfo *exception)
159159
{
160160
LinkedListInfo
161-
*mime_cache;
161+
*cache;
162162

163163
MagickStatusType
164164
status;
165165

166-
mime_cache=NewLinkedList(0);
167-
if (mime_cache == (LinkedListInfo *) NULL)
166+
cache=NewLinkedList(0);
167+
if (cache == (LinkedListInfo *) NULL)
168168
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
169169
status=MagickTrue;
170170
#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
@@ -179,16 +179,16 @@ MagickExport LinkedListInfo *AcquireMimeCache(const char *filename,
179179
option=(const StringInfo *) GetNextValueInLinkedList(options);
180180
while (option != (const StringInfo *) NULL)
181181
{
182-
status&=LoadMimeCache(mime_cache,(const char *)
182+
status&=LoadMimeCache(cache,(const char *)
183183
GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
184184
option=(const StringInfo *) GetNextValueInLinkedList(options);
185185
}
186186
options=DestroyConfigureOptions(options);
187187
}
188188
#endif
189-
if (IsLinkedListEmpty(mime_cache) != MagickFalse)
190-
status&=LoadMimeCache(mime_cache,MimeMap,"built-in",0,exception);
191-
return(mime_cache);
189+
if (IsLinkedListEmpty(cache) != MagickFalse)
190+
status&=LoadMimeCache(cache,MimeMap,"built-in",0,exception);
191+
return(cache);
192192
}
193193

194194
/*
@@ -775,9 +775,8 @@ MagickExport MagickBooleanType ListMimeInfo(FILE *file,ExceptionInfo *exception)
775775
%
776776
% The format of the LoadMimeCache method is:
777777
%
778-
% MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
779-
% const char *xml,const char *filename,const size_t depth,
780-
% ExceptionInfo *exception)
778+
% MagickBooleanType LoadMimeCache(LinkedListInfo *cache,const char *xml,
779+
% const char *filename,const size_t depth,ExceptionInfo *exception)
781780
%
782781
% A description of each parameter follows:
783782
%
@@ -790,9 +789,8 @@ MagickExport MagickBooleanType ListMimeInfo(FILE *file,ExceptionInfo *exception)
790789
% o exception: return any errors or warnings in this structure.
791790
%
792791
*/
793-
static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
794-
const char *xml,const char *filename,const size_t depth,
795-
ExceptionInfo *exception)
792+
static MagickBooleanType LoadMimeCache(LinkedListInfo *cache,const char *xml,
793+
const char *filename,const size_t depth,ExceptionInfo *exception)
796794
{
797795
const char
798796
*attribute;
@@ -848,7 +846,7 @@ static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
848846
file_xml=FileToXML(path,~0UL);
849847
if (file_xml != (char *) NULL)
850848
{
851-
status&=LoadMimeCache(mime_cache,file_xml,path,depth+1,exception);
849+
status&=LoadMimeCache(cache,file_xml,path,depth+1,exception);
852850
file_xml=DestroyString(file_xml);
853851
}
854852
}
@@ -961,7 +959,7 @@ static MagickBooleanType LoadMimeCache(LinkedListInfo *mime_cache,
961959
attribute=GetXMLTreeAttribute(mime,"type");
962960
if (attribute != (const char *) NULL)
963961
mime_info->type=ConstantString(attribute);
964-
status=AppendValueToLinkedList(mime_cache,mime_info);
962+
status=AppendValueToLinkedList(cache,mime_info);
965963
if (status == MagickFalse)
966964
(void) ThrowMagickException(exception,GetMagickModule(),
967965
ResourceLimitError,"MemoryAllocationFailed","`%s'",filename);

0 commit comments

Comments
 (0)