From a45da9d457daa1f2ce937c13ef3e1922f28b4e18 Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 25 Oct 2009 21:29:37 +0000 Subject: [PATCH] --- coders/png.c | 20 ++++++++++---------- coders/tiff.c | 8 ++++---- magick/cache.c | 26 +++++++++++++------------- magick/coder.c | 16 ++++++++-------- magick/color.c | 20 ++++++++++---------- magick/configure.c | 20 ++++++++++---------- magick/constitute.c | 24 ++++++++++++------------ magick/delegate.c | 20 ++++++++++---------- magick/deprecate.c | 2 +- magick/exception.c | 16 ++++++++-------- magick/image.c | 8 ++++---- magick/locale.c | 16 ++++++++-------- magick/log.c | 44 ++++++++++++++++++++++---------------------- magick/magic.c | 20 ++++++++++---------- magick/magick.c | 32 ++++++++++++++++---------------- magick/memory.c | 22 +++++++++++----------- magick/mime.c | 20 ++++++++++---------- magick/module.c | 16 ++++++++-------- magick/policy.c | 24 ++++++++++++------------ magick/registry.c | 8 ++++---- magick/resource.c | 32 ++++++++++++++++---------------- magick/type.c | 24 ++++++++++++------------ wand/wand.c | 12 ++++++------ 23 files changed, 225 insertions(+), 225 deletions(-) diff --git a/coders/png.c b/coders/png.c index 515676e5d..d2f75c3b3 100644 --- a/coders/png.c +++ b/coders/png.c @@ -1703,7 +1703,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, " enter ReadOnePNGImage()"); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - LockSemaphoreInfo(png_semaphore); + (void) LockSemaphoreInfo(png_semaphore); #endif #if (PNG_LIBPNG_VER < 10007) @@ -1748,7 +1748,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, */ png_destroy_read_struct(&ping,&ping_info,&end_info); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif if (logging != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), @@ -2248,7 +2248,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, mng_info->scenes_found-1); png_destroy_read_struct(&ping,&ping_info,&end_info); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif if (logging != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), @@ -2279,7 +2279,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, */ png_destroy_read_struct(&ping,&ping_info,&end_info); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif if (quantum_info != (QuantumInfo *) NULL) quantum_info = DestroyQuantumInfo(quantum_info); @@ -2635,7 +2635,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, image->colors=2; (void) SetImageBackgroundColor(image); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif if (logging != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), @@ -2840,7 +2840,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, png_pixels=(unsigned char *) RelinquishMagickMemory(png_pixels); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif if (logging != MagickFalse) @@ -6274,7 +6274,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, " enter WriteOnePNGImage()"); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - LockSemaphoreInfo(png_semaphore); + (void) LockSemaphoreInfo(png_semaphore); #endif quantum_info = (QuantumInfo *) NULL; @@ -6321,7 +6321,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, #endif png_destroy_write_struct(&ping,&ping_info); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif return(MagickFalse); } @@ -7424,7 +7424,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (png_pixels != (unsigned char *) NULL) png_pixels=(unsigned char *) RelinquishMagickMemory(png_pixels); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif return(MagickFalse); } @@ -7780,7 +7780,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, png_pixels=(unsigned char *) RelinquishMagickMemory(png_pixels); #if defined(PNG_SETJMP_NOT_THREAD_SAFE) - UnlockSemaphoreInfo(png_semaphore); + (void) UnlockSemaphoreInfo(png_semaphore); #endif if (logging != MagickFalse) diff --git a/coders/tiff.c b/coders/tiff.c index 24e0be5f8..3f773833c 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1662,14 +1662,14 @@ ModuleExport unsigned long RegisterTIFFImage(void) if (tiff_semaphore == (SemaphoreInfo *) NULL) tiff_semaphore=AllocateSemaphoreInfo(); - LockSemaphoreInfo(tiff_semaphore); + (void) LockSemaphoreInfo(tiff_semaphore); if (instantiate_key == MagickFalse) { if (MagickCreateThreadKey(&tiff_exception) == MagickFalse) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); instantiate_key=MagickTrue; } - UnlockSemaphoreInfo(tiff_semaphore); + (void) UnlockSemaphoreInfo(tiff_semaphore); *version='\0'; #if defined(TIFF_VERSION) (void) FormatMagickString(version,MaxTextExtent,"%d",TIFF_VERSION); @@ -1784,12 +1784,12 @@ ModuleExport void UnregisterTIFFImage(void) (void) UnregisterMagickInfo("TIF"); (void) UnregisterMagickInfo("TIFF"); (void) UnregisterMagickInfo("TIFF64"); - LockSemaphoreInfo(tiff_semaphore); + (void) LockSemaphoreInfo(tiff_semaphore); if (instantiate_key != MagickFalse) if (MagickDeleteThreadKey(tiff_exception) == MagickFalse) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); instantiate_key=MagickFalse; - UnlockSemaphoreInfo(tiff_semaphore); + (void) UnlockSemaphoreInfo(tiff_semaphore); DestroySemaphoreInfo(&tiff_semaphore); } diff --git a/magick/cache.c b/magick/cache.c index cbb7321a2..a236deb5a 100644 --- a/magick/cache.c +++ b/magick/cache.c @@ -205,7 +205,7 @@ MagickExport Cache AcquirePixelCache(const unsigned long number_threads) { if (cache_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&cache_semaphore); - LockSemaphoreInfo(cache_semaphore); + (void) LockSemaphoreInfo(cache_semaphore); if ((cache_resources == (SplayTreeInfo *) NULL) && (instantiate_cache == MagickFalse)) { @@ -213,7 +213,7 @@ MagickExport Cache AcquirePixelCache(const unsigned long number_threads) NULL,(void *(*)(void *)) NULL,(void *(*)(void *)) NULL); instantiate_cache=MagickTrue; } - UnlockSemaphoreInfo(cache_semaphore); + (void) UnlockSemaphoreInfo(cache_semaphore); } (void) AddValueToSplayTree(cache_resources,cache_info,cache_info); return((Cache ) cache_info); @@ -312,11 +312,11 @@ MagickExport void CacheComponentTerminus(void) { if (cache_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&cache_semaphore); - LockSemaphoreInfo(cache_semaphore); + (void) LockSemaphoreInfo(cache_semaphore); if (cache_resources != (SplayTreeInfo *) NULL) cache_resources=DestroySplayTree(cache_resources); instantiate_cache=MagickFalse; - UnlockSemaphoreInfo(cache_semaphore); + (void) UnlockSemaphoreInfo(cache_semaphore); DestroySemaphoreInfo(&cache_semaphore); } @@ -601,11 +601,11 @@ static MagickBooleanType ClosePixelCacheOnDisk(CacheInfo *cache_info) int status; - LockSemaphoreInfo(cache_info->disk_semaphore); + (void) LockSemaphoreInfo(cache_info->disk_semaphore); status=close(cache_info->file); cache_info->file=(-1); RelinquishMagickResource(FileResource,1); - UnlockSemaphoreInfo(cache_info->disk_semaphore); + (void) UnlockSemaphoreInfo(cache_info->disk_semaphore); return(status == -1 ? MagickFalse : MagickTrue); } @@ -620,10 +620,10 @@ static void LimitPixelCacheDescriptors(void) */ if (GetMagickResource(FileResource) < GetMagickResourceLimit(FileResource)) return; - LockSemaphoreInfo(cache_semaphore); + (void) LockSemaphoreInfo(cache_semaphore); if (cache_resources == (SplayTreeInfo *) NULL) { - UnlockSemaphoreInfo(cache_semaphore); + (void) UnlockSemaphoreInfo(cache_semaphore); return; } ResetSplayTreeIterator(cache_resources); @@ -649,7 +649,7 @@ static void LimitPixelCacheDescriptors(void) } if (q != (CacheInfo *) NULL) (void) ClosePixelCacheOnDisk(q); /* relinquish least recently used cache */ - UnlockSemaphoreInfo(cache_semaphore); + (void) UnlockSemaphoreInfo(cache_semaphore); } static inline MagickSizeType MagickMax(const MagickSizeType x, @@ -677,10 +677,10 @@ static MagickBooleanType OpenPixelCacheOnDisk(CacheInfo *cache_info, /* Open pixel cache on disk. */ - LockSemaphoreInfo(cache_info->disk_semaphore); + (void) LockSemaphoreInfo(cache_info->disk_semaphore); if (cache_info->file != -1) { - UnlockSemaphoreInfo(cache_info->disk_semaphore); + (void) UnlockSemaphoreInfo(cache_info->disk_semaphore); return(MagickTrue); /* cache already open */ } LimitPixelCacheDescriptors(); @@ -714,13 +714,13 @@ static MagickBooleanType OpenPixelCacheOnDisk(CacheInfo *cache_info, } if (file == -1) { - UnlockSemaphoreInfo(cache_info->disk_semaphore); + (void) UnlockSemaphoreInfo(cache_info->disk_semaphore); return(MagickFalse); } (void) AcquireMagickResource(FileResource,1); cache_info->file=file; cache_info->timestamp=time(0); - UnlockSemaphoreInfo(cache_info->disk_semaphore); + (void) UnlockSemaphoreInfo(cache_info->disk_semaphore); return(MagickTrue); } diff --git a/magick/coder.c b/magick/coder.c index 264ac74c2..08f58565b 100644 --- a/magick/coder.c +++ b/magick/coder.c @@ -282,11 +282,11 @@ MagickExport void CoderComponentTerminus(void) { if (coder_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&coder_semaphore); - LockSemaphoreInfo(coder_semaphore); + (void) LockSemaphoreInfo(coder_semaphore); if (coder_list != (SplayTreeInfo *) NULL) coder_list=DestroySplayTree(coder_list); instantiate_coder=MagickFalse; - UnlockSemaphoreInfo(coder_semaphore); + (void) UnlockSemaphoreInfo(coder_semaphore); DestroySemaphoreInfo(&coder_semaphore); } @@ -403,7 +403,7 @@ MagickExport const CoderInfo **GetCoderInfoList(const char *pattern, /* Generate coder list. */ - LockSemaphoreInfo(coder_semaphore); + (void) LockSemaphoreInfo(coder_semaphore); ResetSplayTreeIterator(coder_list); p=(const CoderInfo *) GetNextValueInSplayTree(coder_list); for (i=0; p != (const CoderInfo *) NULL; ) @@ -413,7 +413,7 @@ MagickExport const CoderInfo **GetCoderInfoList(const char *pattern, coder_map[i++]=p; p=(const CoderInfo *) GetNextValueInSplayTree(coder_list); } - UnlockSemaphoreInfo(coder_semaphore); + (void) UnlockSemaphoreInfo(coder_semaphore); qsort((void *) coder_map,(size_t) i,sizeof(*coder_map),CoderInfoCompare); coder_map[i]=(CoderInfo *) NULL; *number_coders=(unsigned long) i; @@ -488,7 +488,7 @@ MagickExport char **GetCoderList(const char *pattern, /* Generate coder list. */ - LockSemaphoreInfo(coder_semaphore); + (void) LockSemaphoreInfo(coder_semaphore); ResetSplayTreeIterator(coder_list); p=(const CoderInfo *) GetNextValueInSplayTree(coder_list); for (i=0; p != (const CoderInfo *) NULL; ) @@ -498,7 +498,7 @@ MagickExport char **GetCoderList(const char *pattern, coder_map[i++]=ConstantString(p->name); p=(const CoderInfo *) GetNextValueInSplayTree(coder_list); } - UnlockSemaphoreInfo(coder_semaphore); + (void) UnlockSemaphoreInfo(coder_semaphore); qsort((void *) coder_map,(size_t) i,sizeof(*coder_map),CoderCompare); coder_map[i]=(char *) NULL; *number_coders=(unsigned long) i; @@ -534,14 +534,14 @@ static MagickBooleanType InitializeCoderList(ExceptionInfo *exception) { if (coder_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&coder_semaphore); - LockSemaphoreInfo(coder_semaphore); + (void) LockSemaphoreInfo(coder_semaphore); if ((coder_list == (SplayTreeInfo *) NULL) && (instantiate_coder == MagickFalse)) { (void) LoadCoderLists(MagickCoderFilename,exception); instantiate_coder=MagickTrue; } - UnlockSemaphoreInfo(coder_semaphore); + (void) UnlockSemaphoreInfo(coder_semaphore); } return(coder_list != (SplayTreeInfo *) NULL ? MagickTrue : MagickFalse); } diff --git a/magick/color.c b/magick/color.c index ca6fb01b8..61b990ce1 100644 --- a/magick/color.c +++ b/magick/color.c @@ -861,11 +861,11 @@ MagickExport void ColorComponentTerminus(void) { if (color_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&color_semaphore); - LockSemaphoreInfo(color_semaphore); + (void) LockSemaphoreInfo(color_semaphore); if (color_list != (LinkedListInfo *) NULL) color_list=DestroyLinkedList(color_list,DestroyColorElement); instantiate_color=MagickFalse; - UnlockSemaphoreInfo(color_semaphore); + (void) UnlockSemaphoreInfo(color_semaphore); DestroySemaphoreInfo(&color_semaphore); } @@ -934,7 +934,7 @@ MagickExport const ColorInfo *GetColorInfo(const char *name, /* Search for color tag. */ - LockSemaphoreInfo(color_semaphore); + (void) LockSemaphoreInfo(color_semaphore); ResetLinkedListIterator(color_list); p=(const ColorInfo *) GetNextValueInLinkedList(color_list); while (p != (const ColorInfo *) NULL) @@ -949,7 +949,7 @@ MagickExport const ColorInfo *GetColorInfo(const char *name, else (void) InsertValueInLinkedList(color_list,0, RemoveElementByValueFromLinkedList(color_list,p)); - UnlockSemaphoreInfo(color_semaphore); + (void) UnlockSemaphoreInfo(color_semaphore); return(p); } @@ -1148,7 +1148,7 @@ MagickExport const ColorInfo **GetColorInfoList(const char *pattern, /* Generate color list. */ - LockSemaphoreInfo(color_semaphore); + (void) LockSemaphoreInfo(color_semaphore); ResetLinkedListIterator(color_list); p=(const ColorInfo *) GetNextValueInLinkedList(color_list); for (i=0; p != (const ColorInfo *) NULL; ) @@ -1158,7 +1158,7 @@ MagickExport const ColorInfo **GetColorInfoList(const char *pattern, colors[i++]=p; p=(const ColorInfo *) GetNextValueInLinkedList(color_list); } - UnlockSemaphoreInfo(color_semaphore); + (void) UnlockSemaphoreInfo(color_semaphore); qsort((void *) colors,(size_t) i,sizeof(*colors),ColorInfoCompare); colors[i]=(ColorInfo *) NULL; *number_colors=(unsigned long) i; @@ -1241,7 +1241,7 @@ MagickExport char **GetColorList(const char *pattern, /* Generate color list. */ - LockSemaphoreInfo(color_semaphore); + (void) LockSemaphoreInfo(color_semaphore); ResetLinkedListIterator(color_list); p=(const ColorInfo *) GetNextValueInLinkedList(color_list); for (i=0; p != (const ColorInfo *) NULL; ) @@ -1251,7 +1251,7 @@ MagickExport char **GetColorList(const char *pattern, colors[i++]=ConstantString(p->name); p=(const ColorInfo *) GetNextValueInLinkedList(color_list); } - UnlockSemaphoreInfo(color_semaphore); + (void) UnlockSemaphoreInfo(color_semaphore); qsort((void *) colors,(size_t) i,sizeof(*colors),ColorCompare); colors[i]=(char *) NULL; *number_colors=(unsigned long) i; @@ -1458,14 +1458,14 @@ static MagickBooleanType InitializeColorList(ExceptionInfo *exception) { if (color_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&color_semaphore); - LockSemaphoreInfo(color_semaphore); + (void) LockSemaphoreInfo(color_semaphore); if ((color_list == (LinkedListInfo *) NULL) && (instantiate_color == MagickFalse)) { (void) LoadColorLists(ColorFilename,exception); instantiate_color=MagickTrue; } - UnlockSemaphoreInfo(color_semaphore); + (void) UnlockSemaphoreInfo(color_semaphore); } return(color_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse); } diff --git a/magick/configure.c b/magick/configure.c index c4c569c0e..d20da4be8 100644 --- a/magick/configure.c +++ b/magick/configure.c @@ -161,12 +161,12 @@ MagickExport void ConfigureComponentTerminus(void) { if (configure_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&configure_semaphore); - LockSemaphoreInfo(configure_semaphore); + (void) LockSemaphoreInfo(configure_semaphore); if (configure_list != (LinkedListInfo *) NULL) configure_list=DestroyLinkedList(configure_list,DestroyConfigureElement); configure_list=(LinkedListInfo *) NULL; instantiate_configure=MagickFalse; - UnlockSemaphoreInfo(configure_semaphore); + (void) UnlockSemaphoreInfo(configure_semaphore); DestroySemaphoreInfo(&configure_semaphore); } @@ -254,7 +254,7 @@ MagickExport const ConfigureInfo *GetConfigureInfo(const char *name, /* Search for configure tag. */ - LockSemaphoreInfo(configure_semaphore); + (void) LockSemaphoreInfo(configure_semaphore); ResetLinkedListIterator(configure_list); p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_list); while (p != (const ConfigureInfo *) NULL) @@ -266,7 +266,7 @@ MagickExport const ConfigureInfo *GetConfigureInfo(const char *name, if (p != (ConfigureInfo *) NULL) (void) InsertValueInLinkedList(configure_list,0, RemoveElementByValueFromLinkedList(configure_list,p)); - UnlockSemaphoreInfo(configure_semaphore); + (void) UnlockSemaphoreInfo(configure_semaphore); return(p); } @@ -350,7 +350,7 @@ MagickExport const ConfigureInfo **GetConfigureInfoList(const char *pattern, /* Generate configure list. */ - LockSemaphoreInfo(configure_semaphore); + (void) LockSemaphoreInfo(configure_semaphore); ResetLinkedListIterator(configure_list); p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_list); for (i=0; p != (const ConfigureInfo *) NULL; ) @@ -360,7 +360,7 @@ MagickExport const ConfigureInfo **GetConfigureInfoList(const char *pattern, options[i++]=p; p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_list); } - UnlockSemaphoreInfo(configure_semaphore); + (void) UnlockSemaphoreInfo(configure_semaphore); qsort((void *) options,(size_t) i,sizeof(*options),ConfigureInfoCompare); options[i]=(ConfigureInfo *) NULL; *number_options=(unsigned long) i; @@ -441,7 +441,7 @@ MagickExport char **GetConfigureList(const char *pattern, GetNumberOfElementsInLinkedList(configure_list)+1UL,sizeof(*options)); if (options == (char **) NULL) return((char **) NULL); - LockSemaphoreInfo(configure_semaphore); + (void) LockSemaphoreInfo(configure_semaphore); ResetLinkedListIterator(configure_list); p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_list); for (i=0; p != (const ConfigureInfo *) NULL; ) @@ -451,7 +451,7 @@ MagickExport char **GetConfigureList(const char *pattern, options[i++]=ConstantString(p->name); p=(const ConfigureInfo *) GetNextValueInLinkedList(configure_list); } - UnlockSemaphoreInfo(configure_semaphore); + (void) UnlockSemaphoreInfo(configure_semaphore); qsort((void *) options,(size_t) i,sizeof(*options),ConfigureCompare); options[i]=(char *) NULL; *number_options=(unsigned long) i; @@ -870,14 +870,14 @@ static MagickBooleanType InitializeConfigureList(ExceptionInfo *exception) { if (configure_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&configure_semaphore); - LockSemaphoreInfo(configure_semaphore); + (void) LockSemaphoreInfo(configure_semaphore); if ((configure_list == (LinkedListInfo *) NULL) && (instantiate_configure == MagickFalse)) { (void) LoadConfigureLists(ConfigureFilename,exception); instantiate_configure=MagickTrue; } - UnlockSemaphoreInfo(configure_semaphore); + (void) UnlockSemaphoreInfo(configure_semaphore); } return(configure_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse); } diff --git a/magick/constitute.c b/magick/constitute.c index 6473319cf..10d4832d3 100644 --- a/magick/constitute.c +++ b/magick/constitute.c @@ -517,10 +517,10 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, { thread_support=GetMagickThreadSupport(magick_info); if ((thread_support & DecoderThreadSupport) == 0) - LockSemaphoreInfo(constitute_semaphore); + (void) LockSemaphoreInfo(constitute_semaphore); image=GetImageDecoder(magick_info)(read_info,exception); if ((thread_support & DecoderThreadSupport) == 0) - UnlockSemaphoreInfo(constitute_semaphore); + (void) UnlockSemaphoreInfo(constitute_semaphore); } else { @@ -549,11 +549,11 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, MaxTextExtent); *read_info->filename='\0'; if (GetDelegateThreadSupport(delegate_info) == MagickFalse) - LockSemaphoreInfo(constitute_semaphore); + (void) LockSemaphoreInfo(constitute_semaphore); (void) InvokeDelegate(read_info,image,read_info->magick,(char *) NULL, exception); if (GetDelegateThreadSupport(delegate_info) == MagickFalse) - UnlockSemaphoreInfo(constitute_semaphore); + (void) UnlockSemaphoreInfo(constitute_semaphore); image=DestroyImageList(image); read_info->temporary=MagickTrue; (void) SetImageInfo(read_info,MagickFalse,exception); @@ -573,10 +573,10 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, } thread_support=GetMagickThreadSupport(magick_info); if ((thread_support & DecoderThreadSupport) == 0) - LockSemaphoreInfo(constitute_semaphore); + (void) LockSemaphoreInfo(constitute_semaphore); image=(Image *) (GetImageDecoder(magick_info))(read_info,exception); if ((thread_support & DecoderThreadSupport) == 0) - UnlockSemaphoreInfo(constitute_semaphore); + (void) UnlockSemaphoreInfo(constitute_semaphore); } if (read_info->temporary != MagickFalse) { @@ -1104,10 +1104,10 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info, */ thread_support=GetMagickThreadSupport(magick_info); if ((thread_support & EncoderThreadSupport) == 0) - LockSemaphoreInfo(constitute_semaphore); + (void) LockSemaphoreInfo(constitute_semaphore); status=GetImageEncoder(magick_info)(write_info,image); if ((thread_support & EncoderThreadSupport) == 0) - UnlockSemaphoreInfo(constitute_semaphore); + (void) UnlockSemaphoreInfo(constitute_semaphore); } else { @@ -1120,11 +1120,11 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info, */ *write_info->filename='\0'; if (GetDelegateThreadSupport(delegate_info) == MagickFalse) - LockSemaphoreInfo(constitute_semaphore); + (void) LockSemaphoreInfo(constitute_semaphore); status=InvokeDelegate(write_info,image,(char *) NULL, write_info->magick,&image->exception); if (GetDelegateThreadSupport(delegate_info) == MagickFalse) - UnlockSemaphoreInfo(constitute_semaphore); + (void) UnlockSemaphoreInfo(constitute_semaphore); (void) CopyMagickString(image->filename,filename,MaxTextExtent); } else @@ -1151,10 +1151,10 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info, */ thread_support=GetMagickThreadSupport(magick_info); if ((thread_support & EncoderThreadSupport) == 0) - LockSemaphoreInfo(constitute_semaphore); + (void) LockSemaphoreInfo(constitute_semaphore); status=GetImageEncoder(magick_info)(write_info,image); if ((thread_support & EncoderThreadSupport) == 0) - UnlockSemaphoreInfo(constitute_semaphore); + (void) UnlockSemaphoreInfo(constitute_semaphore); } } } diff --git a/magick/delegate.c b/magick/delegate.c index 3171f139f..8becc7e68 100644 --- a/magick/delegate.c +++ b/magick/delegate.c @@ -211,11 +211,11 @@ MagickExport void DelegateComponentTerminus(void) { if (delegate_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&delegate_semaphore); - LockSemaphoreInfo(delegate_semaphore); + (void) LockSemaphoreInfo(delegate_semaphore); if (delegate_list != (LinkedListInfo *) NULL) delegate_list=DestroyLinkedList(delegate_list,DestroyDelegate); instantiate_delegate=MagickFalse; - UnlockSemaphoreInfo(delegate_semaphore); + (void) UnlockSemaphoreInfo(delegate_semaphore); DestroySemaphoreInfo(&delegate_semaphore); } @@ -381,7 +381,7 @@ MagickExport const DelegateInfo *GetDelegateInfo(const char *decode, /* Search for named delegate. */ - LockSemaphoreInfo(delegate_semaphore); + (void) LockSemaphoreInfo(delegate_semaphore); ResetLinkedListIterator(delegate_list); p=(const DelegateInfo *) GetNextValueInLinkedList(delegate_list); while (p != (const DelegateInfo *) NULL) @@ -414,7 +414,7 @@ MagickExport const DelegateInfo *GetDelegateInfo(const char *decode, if (p != (const DelegateInfo *) NULL) (void) InsertValueInLinkedList(delegate_list,0, RemoveElementByValueFromLinkedList(delegate_list,p)); - UnlockSemaphoreInfo(delegate_semaphore); + (void) UnlockSemaphoreInfo(delegate_semaphore); return(p); } @@ -505,7 +505,7 @@ MagickExport const DelegateInfo **GetDelegateInfoList(const char *pattern, /* Generate delegate list. */ - LockSemaphoreInfo(delegate_semaphore); + (void) LockSemaphoreInfo(delegate_semaphore); ResetLinkedListIterator(delegate_list); p=(const DelegateInfo *) GetNextValueInLinkedList(delegate_list); for (i=0; p != (const DelegateInfo *) NULL; ) @@ -516,7 +516,7 @@ MagickExport const DelegateInfo **GetDelegateInfoList(const char *pattern, delegates[i++]=p; p=(const DelegateInfo *) GetNextValueInLinkedList(delegate_list); } - UnlockSemaphoreInfo(delegate_semaphore); + (void) UnlockSemaphoreInfo(delegate_semaphore); qsort((void *) delegates,(size_t) i,sizeof(*delegates),DelegateInfoCompare); delegates[i]=(DelegateInfo *) NULL; *number_delegates=(unsigned long) i; @@ -598,7 +598,7 @@ MagickExport char **GetDelegateList(const char *pattern, GetNumberOfElementsInLinkedList(delegate_list)+1UL,sizeof(*delegates)); if (delegates == (char **) NULL) return((char **) NULL); - LockSemaphoreInfo(delegate_semaphore); + (void) LockSemaphoreInfo(delegate_semaphore); ResetLinkedListIterator(delegate_list); p=(const DelegateInfo *) GetNextValueInLinkedList(delegate_list); for (i=0; p != (const DelegateInfo *) NULL; ) @@ -611,7 +611,7 @@ MagickExport char **GetDelegateList(const char *pattern, delegates[i++]=ConstantString(p->encode); p=(const DelegateInfo *) GetNextValueInLinkedList(delegate_list); } - UnlockSemaphoreInfo(delegate_semaphore); + (void) UnlockSemaphoreInfo(delegate_semaphore); qsort((void *) delegates,(size_t) i,sizeof(*delegates),DelegateCompare); delegates[i]=(char *) NULL; *number_delegates=(unsigned long) i; @@ -710,14 +710,14 @@ static MagickBooleanType InitializeDelegateList(ExceptionInfo *exception) { if (delegate_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&delegate_semaphore); - LockSemaphoreInfo(delegate_semaphore); + (void) LockSemaphoreInfo(delegate_semaphore); if ((delegate_list == (LinkedListInfo *) NULL) && (instantiate_delegate == MagickFalse)) { (void) LoadDelegateLists(DelegateFilename,exception); instantiate_delegate=MagickTrue; } - UnlockSemaphoreInfo(delegate_semaphore); + (void) UnlockSemaphoreInfo(delegate_semaphore); } return(delegate_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse); } diff --git a/magick/deprecate.c b/magick/deprecate.c index c3b337c39..76fd99b6a 100644 --- a/magick/deprecate.c +++ b/magick/deprecate.c @@ -3758,7 +3758,7 @@ MagickExport void LiberateMemory(void **memory) MagickExport void LiberateSemaphoreInfo(SemaphoreInfo **semaphore_info) { (void) LogMagickEvent(DeprecateEvent,GetMagickModule(),"last use: v5.5.7"); - UnlockSemaphoreInfo(*semaphore_info); + (void) UnlockSemaphoreInfo(*semaphore_info); } /* diff --git a/magick/exception.c b/magick/exception.c index d1d23512e..14839d374 100644 --- a/magick/exception.c +++ b/magick/exception.c @@ -158,7 +158,7 @@ MagickExport void ClearMagickException(ExceptionInfo *exception) assert(exception->signature == MagickSignature); if (exception->exceptions == (void *) NULL) return; - LockSemaphoreInfo(exception->semaphore); + (void) LockSemaphoreInfo(exception->semaphore); p=(ExceptionInfo *) RemoveLastElementFromLinkedList((LinkedListInfo *) exception->exceptions); while (p != (ExceptionInfo *) NULL) @@ -170,7 +170,7 @@ MagickExport void ClearMagickException(ExceptionInfo *exception) exception->severity=UndefinedException; exception->reason=(char *) NULL; exception->description=(char *) NULL; - UnlockSemaphoreInfo(exception->semaphore); + (void) UnlockSemaphoreInfo(exception->semaphore); errno=0; } @@ -206,7 +206,7 @@ MagickExport void CatchException(ExceptionInfo *exception) assert(exception->signature == MagickSignature); if (exception->exceptions == (void *) NULL) return; - LockSemaphoreInfo(exception->semaphore); + (void) LockSemaphoreInfo(exception->semaphore); ResetLinkedListIterator((LinkedListInfo *) exception->exceptions); p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *) exception->exceptions); @@ -221,7 +221,7 @@ MagickExport void CatchException(ExceptionInfo *exception) p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *) exception->exceptions); } - UnlockSemaphoreInfo(exception->semaphore); + (void) UnlockSemaphoreInfo(exception->semaphore); ClearMagickException(exception); } @@ -378,7 +378,7 @@ MagickExport ExceptionInfo *DestroyExceptionInfo(ExceptionInfo *exception) assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - LockSemaphoreInfo(exception->semaphore); + (void) LockSemaphoreInfo(exception->semaphore); exception->severity=UndefinedException; if (exception->exceptions != (void *) NULL) exception->exceptions=(void *) DestroyLinkedList((LinkedListInfo *) @@ -386,7 +386,7 @@ MagickExport ExceptionInfo *DestroyExceptionInfo(ExceptionInfo *exception) relinquish=exception->relinquish; if (exception->relinquish != MagickFalse) exception->signature=(~MagickSignature); - UnlockSemaphoreInfo(exception->semaphore); + (void) UnlockSemaphoreInfo(exception->semaphore); DestroySemaphoreInfo(&exception->semaphore); if (relinquish != MagickFalse) exception=(ExceptionInfo *) RelinquishMagickMemory(exception); @@ -613,7 +613,7 @@ MagickExport void InheritException(ExceptionInfo *exception, assert(relative->signature == MagickSignature); if (relative->exceptions == (void *) NULL) return; - LockSemaphoreInfo(exception->semaphore); + (void) LockSemaphoreInfo(exception->semaphore); ResetLinkedListIterator((LinkedListInfo *) relative->exceptions); p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *) relative->exceptions); @@ -623,7 +623,7 @@ MagickExport void InheritException(ExceptionInfo *exception, p=(const ExceptionInfo *) GetNextValueInLinkedList((LinkedListInfo *) relative->exceptions); } - UnlockSemaphoreInfo(exception->semaphore); + (void) UnlockSemaphoreInfo(exception->semaphore); } /* diff --git a/magick/image.c b/magick/image.c index 7bda14a21..1e725e7e4 100644 --- a/magick/image.c +++ b/magick/image.c @@ -1627,9 +1627,9 @@ MagickExport long GetImageReferenceCount(Image *image) assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - LockSemaphoreInfo(image->semaphore); + (void) LockSemaphoreInfo(image->semaphore); reference_count=image->reference_count; - UnlockSemaphoreInfo(image->semaphore); + (void) UnlockSemaphoreInfo(image->semaphore); return(reference_count); } @@ -2066,9 +2066,9 @@ MagickExport MagickBooleanType ModifyImage(Image **image, if (GetImageReferenceCount(*image) <= 1) return(MagickTrue); clone_image=CloneImage(*image,0,0,MagickTrue,exception); - LockSemaphoreInfo((*image)->semaphore); + (void) LockSemaphoreInfo((*image)->semaphore); (*image)->reference_count--; - UnlockSemaphoreInfo((*image)->semaphore); + (void) UnlockSemaphoreInfo((*image)->semaphore); *image=clone_image; return(MagickTrue); } diff --git a/magick/locale.c b/magick/locale.c index a10559b53..42d0bd23c 100644 --- a/magick/locale.c +++ b/magick/locale.c @@ -254,7 +254,7 @@ MagickExport const LocaleInfo **GetLocaleInfoList(const char *pattern, /* Generate locale list. */ - LockSemaphoreInfo(locale_semaphore); + (void) LockSemaphoreInfo(locale_semaphore); ResetSplayTreeIterator(locale_list); p=(const LocaleInfo *) GetNextValueInSplayTree(locale_list); for (i=0; p != (const LocaleInfo *) NULL; ) @@ -264,7 +264,7 @@ MagickExport const LocaleInfo **GetLocaleInfoList(const char *pattern, messages[i++]=p; p=(const LocaleInfo *) GetNextValueInSplayTree(locale_list); } - UnlockSemaphoreInfo(locale_semaphore); + (void) UnlockSemaphoreInfo(locale_semaphore); qsort((void *) messages,(size_t) i,sizeof(*messages),LocaleInfoCompare); messages[i]=(LocaleInfo *) NULL; *number_messages=(unsigned long) i; @@ -346,7 +346,7 @@ MagickExport char **GetLocaleList(const char *pattern, GetNumberOfNodesInSplayTree(locale_list)+1UL,sizeof(*messages)); if (messages == (char **) NULL) return((char **) NULL); - LockSemaphoreInfo(locale_semaphore); + (void) LockSemaphoreInfo(locale_semaphore); p=(const LocaleInfo *) GetNextValueInSplayTree(locale_list); for (i=0; p != (const LocaleInfo *) NULL; ) { @@ -355,7 +355,7 @@ MagickExport char **GetLocaleList(const char *pattern, messages[i++]=ConstantString(p->tag); p=(const LocaleInfo *) GetNextValueInSplayTree(locale_list); } - UnlockSemaphoreInfo(locale_semaphore); + (void) UnlockSemaphoreInfo(locale_semaphore); qsort((void *) messages,(size_t) i,sizeof(*messages),LocaleTagCompare); messages[i]=(char *) NULL; *number_messages=(unsigned long) i; @@ -551,7 +551,7 @@ static MagickBooleanType InitializeLocaleList(ExceptionInfo *exception) { if (locale_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&locale_semaphore); - LockSemaphoreInfo(locale_semaphore); + (void) LockSemaphoreInfo(locale_semaphore); if ((locale_list == (SplayTreeInfo *) NULL) && (instantiate_locale == MagickFalse)) { @@ -579,7 +579,7 @@ static MagickBooleanType InitializeLocaleList(ExceptionInfo *exception) locale=DestroyString(locale); instantiate_locale=MagickTrue; } - UnlockSemaphoreInfo(locale_semaphore); + (void) UnlockSemaphoreInfo(locale_semaphore); } return(locale_list != (SplayTreeInfo *) NULL ? MagickTrue : MagickFalse); } @@ -1075,10 +1075,10 @@ MagickExport void LocaleComponentTerminus(void) { if (locale_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&locale_semaphore); - LockSemaphoreInfo(locale_semaphore); + (void) LockSemaphoreInfo(locale_semaphore); if (locale_list != (SplayTreeInfo *) NULL) locale_list=DestroySplayTree(locale_list); instantiate_locale=MagickFalse; - UnlockSemaphoreInfo(locale_semaphore); + (void) UnlockSemaphoreInfo(locale_semaphore); DestroySemaphoreInfo(&locale_semaphore); } diff --git a/magick/log.c b/magick/log.c index 677fe2121..a10baaeb0 100644 --- a/magick/log.c +++ b/magick/log.c @@ -225,7 +225,7 @@ MagickExport void CloseMagickLog(void) exception=AcquireExceptionInfo(); log_info=GetLogInfo("*",exception); exception=DestroyExceptionInfo(exception); - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); if (log_info->file != (FILE *) NULL) { if (log_info->append == MagickFalse) @@ -233,7 +233,7 @@ MagickExport void CloseMagickLog(void) (void) fclose(log_info->file); log_info->file=(FILE *) NULL; } - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); } /* @@ -278,7 +278,7 @@ static LogInfo *GetLogInfo(const char *name,ExceptionInfo *exception) /* Search for log tag. */ - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); ResetLinkedListIterator(log_list); p=(LogInfo *) GetNextValueInLinkedList(log_list); while (p != (LogInfo *) NULL) @@ -290,7 +290,7 @@ static LogInfo *GetLogInfo(const char *name,ExceptionInfo *exception) if (p != (LogInfo *) NULL) (void) InsertValueInLinkedList(log_list,0, RemoveElementByValueFromLinkedList(log_list,p)); - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); return(p); } @@ -371,7 +371,7 @@ MagickExport const LogInfo **GetLogInfoList(const char *pattern, /* Generate log list. */ - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); ResetLinkedListIterator(log_list); p=(const LogInfo *) GetNextValueInLinkedList(log_list); for (i=0; p != (const LogInfo *) NULL; ) @@ -381,7 +381,7 @@ MagickExport const LogInfo **GetLogInfoList(const char *pattern, preferences[i++]=p; p=(const LogInfo *) GetNextValueInLinkedList(log_list); } - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); qsort((void *) preferences,(size_t) i,sizeof(*preferences),LogInfoCompare); preferences[i]=(LogInfo *) NULL; *number_preferences=(unsigned long) i; @@ -464,7 +464,7 @@ MagickExport char **GetLogList(const char *pattern, /* Generate log list. */ - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); ResetLinkedListIterator(log_list); p=(const LogInfo *) GetNextValueInLinkedList(log_list); for (i=0; p != (const LogInfo *) NULL; ) @@ -474,7 +474,7 @@ MagickExport char **GetLogList(const char *pattern, preferences[i++]=ConstantString(p->name); p=(const LogInfo *) GetNextValueInLinkedList(log_list); } - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); qsort((void *) preferences,(size_t) i,sizeof(*preferences),LogCompare); preferences[i]=(char *) NULL; *number_preferences=(unsigned long) i; @@ -532,14 +532,14 @@ static MagickBooleanType InitializeLogList(ExceptionInfo *exception) { if (log_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&log_semaphore); - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); if ((log_list == (LinkedListInfo *) NULL) && (instantiate_log == MagickFalse)) { (void) LoadLogLists(LogFilename,exception); instantiate_log=MagickTrue; } - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); } return(log_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse); } @@ -738,11 +738,11 @@ MagickExport void LogComponentTerminus(void) { if (log_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&log_semaphore); - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); if (log_list != (LinkedListInfo *) NULL) log_list=DestroyLinkedList(log_list,DestroyLogElement); instantiate_log=MagickFalse; - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); DestroySemaphoreInfo(&log_semaphore); } @@ -1127,10 +1127,10 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module, exception=AcquireExceptionInfo(); log_info=(LogInfo *) GetLogInfo("*",exception); exception=DestroyExceptionInfo(exception); - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); if ((log_info->event_mask & type) == 0) { - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); return(MagickTrue); } domain=MagickOptionToMnemonic(MagickLogEventOptions,type); @@ -1145,7 +1145,7 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module, if (text == (char *) NULL) { (void) ContinueTimer((TimerInfo *) &log_info->timer); - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); return(MagickFalse); } if ((log_info->handler_mask & ConsoleHandler) != 0) @@ -1188,7 +1188,7 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module, if (filename == (char *) NULL) { (void) ContinueTimer((TimerInfo *) &log_info->timer); - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); return(MagickFalse); } log_info->append=IsPathAccessible(filename); @@ -1196,7 +1196,7 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module, filename=(char *) RelinquishMagickMemory(filename); if (log_info->file == (FILE *) NULL) { - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); return(MagickFalse); } log_info->generation++; @@ -1222,7 +1222,7 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module, } text=(char *) RelinquishMagickMemory(text); (void) ContinueTimer((TimerInfo *) &log_info->timer); - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); return(MagickTrue); } @@ -1685,12 +1685,12 @@ MagickExport LogEventType SetLogEventMask(const char *events) log_info=(LogInfo *) GetLogInfo("*",exception); exception=DestroyExceptionInfo(exception); option=ParseMagickOption(MagickLogEventOptions,MagickTrue,events); - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); log_info=(LogInfo *) GetValueFromLinkedList(log_list,0); log_info->event_mask=(LogEventType) option; if (option == -1) log_info->event_mask=UndefinedEvents; - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); return(log_info->event_mask); } @@ -1727,11 +1727,11 @@ MagickExport void SetLogFormat(const char *format) exception=AcquireExceptionInfo(); log_info=(LogInfo *) GetLogInfo("*",exception); exception=DestroyExceptionInfo(exception); - LockSemaphoreInfo(log_semaphore); + (void) LockSemaphoreInfo(log_semaphore); if (log_info->format != (char *) NULL) log_info->format=DestroyString(log_info->format); log_info->format=ConstantString(format); - UnlockSemaphoreInfo(log_semaphore); + (void) UnlockSemaphoreInfo(log_semaphore); } /* diff --git a/magick/magic.c b/magick/magic.c index 74b3902e8..3436d020f 100644 --- a/magick/magic.c +++ b/magick/magic.c @@ -259,7 +259,7 @@ MagickExport const MagicInfo *GetMagicInfo(const unsigned char *magic, /* Search for magic tag. */ - LockSemaphoreInfo(magic_semaphore); + (void) LockSemaphoreInfo(magic_semaphore); ResetLinkedListIterator(magic_list); p=(const MagicInfo *) GetNextValueInLinkedList(magic_list); while (p != (const MagicInfo *) NULL) @@ -273,7 +273,7 @@ MagickExport const MagicInfo *GetMagicInfo(const unsigned char *magic, if (p != (const MagicInfo *) NULL) (void) InsertValueInLinkedList(magic_list,0, RemoveElementByValueFromLinkedList(magic_list,p)); - UnlockSemaphoreInfo(magic_semaphore); + (void) UnlockSemaphoreInfo(magic_semaphore); return(p); } @@ -356,7 +356,7 @@ MagickExport const MagicInfo **GetMagicInfoList(const char *pattern, /* Generate magic list. */ - LockSemaphoreInfo(magic_semaphore); + (void) LockSemaphoreInfo(magic_semaphore); ResetLinkedListIterator(magic_list); p=(const MagicInfo *) GetNextValueInLinkedList(magic_list); for (i=0; p != (const MagicInfo *) NULL; ) @@ -366,7 +366,7 @@ MagickExport const MagicInfo **GetMagicInfoList(const char *pattern, aliases[i++]=p; p=(const MagicInfo *) GetNextValueInLinkedList(magic_list); } - UnlockSemaphoreInfo(magic_semaphore); + (void) UnlockSemaphoreInfo(magic_semaphore); qsort((void *) aliases,(size_t) i,sizeof(*aliases),MagicInfoCompare); aliases[i]=(MagicInfo *) NULL; *number_aliases=(unsigned long) i; @@ -448,7 +448,7 @@ MagickExport char **GetMagicList(const char *pattern, GetNumberOfElementsInLinkedList(magic_list)+1UL,sizeof(*aliases)); if (aliases == (char **) NULL) return((char **) NULL); - LockSemaphoreInfo(magic_semaphore); + (void) LockSemaphoreInfo(magic_semaphore); ResetLinkedListIterator(magic_list); p=(const MagicInfo *) GetNextValueInLinkedList(magic_list); for (i=0; p != (const MagicInfo *) NULL; ) @@ -458,7 +458,7 @@ MagickExport char **GetMagicList(const char *pattern, aliases[i++]=ConstantString(p->name); p=(const MagicInfo *) GetNextValueInLinkedList(magic_list); } - UnlockSemaphoreInfo(magic_semaphore); + (void) UnlockSemaphoreInfo(magic_semaphore); qsort((void *) aliases,(size_t) i,sizeof(*aliases),MagicCompare); aliases[i]=(char *) NULL; *number_aliases=(unsigned long) i; @@ -524,14 +524,14 @@ static MagickBooleanType InitializeMagicList(ExceptionInfo *exception) { if (magic_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&magic_semaphore); - LockSemaphoreInfo(magic_semaphore); + (void) LockSemaphoreInfo(magic_semaphore); if ((magic_list == (LinkedListInfo *) NULL) && (instantiate_magic == MagickFalse)) { (void) LoadMagicLists(MagicFilename,exception); instantiate_magic=MagickTrue; } - UnlockSemaphoreInfo(magic_semaphore); + (void) UnlockSemaphoreInfo(magic_semaphore); } return(magic_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse); } @@ -1061,10 +1061,10 @@ MagickExport void MagicComponentTerminus(void) { if (magic_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&magic_semaphore); - LockSemaphoreInfo(magic_semaphore); + (void) LockSemaphoreInfo(magic_semaphore); if (magic_list != (LinkedListInfo *) NULL) magic_list=DestroyLinkedList(magic_list,DestroyMagicElement); instantiate_magic=MagickFalse; - UnlockSemaphoreInfo(magic_semaphore); + (void) UnlockSemaphoreInfo(magic_semaphore); DestroySemaphoreInfo(&magic_semaphore); } diff --git a/magick/magick.c b/magick/magick.c index 9e6828bb3..b2258fe67 100644 --- a/magick/magick.c +++ b/magick/magick.c @@ -228,7 +228,7 @@ MagickExport MagickBooleanType GetImageMagick(const unsigned char *magick, if (p == (const MagickInfo *) NULL) return(MagickFalse); status=MagickFalse; - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); ResetSplayTreeIterator(magick_list); p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); while (p != (const MagickInfo *) NULL) @@ -242,7 +242,7 @@ MagickExport MagickBooleanType GetImageMagick(const unsigned char *magick, } p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); } - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); return(status); } @@ -412,16 +412,16 @@ MagickExport const MagickInfo *GetMagickInfo(const char *name, if (LocaleCompare(name,"*") == 0) (void) OpenModules(exception); #endif - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); ResetSplayTreeIterator(magick_list); p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); return(p); } /* Find name in list. */ - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); ResetSplayTreeIterator(magick_list); p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); while (p != (const MagickInfo *) NULL) @@ -445,7 +445,7 @@ MagickExport const MagickInfo *GetMagickInfo(const char *name, } } #endif - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); return(p); } @@ -526,7 +526,7 @@ MagickExport const MagickInfo **GetMagickInfoList(const char *pattern, /* Generate magick list. */ - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); ResetSplayTreeIterator(magick_list); p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); for (i=0; p != (const MagickInfo *) NULL; ) @@ -536,7 +536,7 @@ MagickExport const MagickInfo **GetMagickInfoList(const char *pattern, formats[i++]=p; p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); } - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); qsort((void *) formats,(size_t) i,sizeof(*formats),MagickInfoCompare); formats[i]=(MagickInfo *) NULL; *number_formats=(unsigned long) i; @@ -616,7 +616,7 @@ MagickExport char **GetMagickList(const char *pattern, GetNumberOfNodesInSplayTree(magick_list)+1UL,sizeof(*formats)); if (formats == (char **) NULL) return((char **) NULL); - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); ResetSplayTreeIterator(magick_list); p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); for (i=0; p != (const MagickInfo *) NULL; ) @@ -626,7 +626,7 @@ MagickExport char **GetMagickList(const char *pattern, formats[i++]=ConstantString(p->name); p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); } - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); qsort((void *) formats,(size_t) i,sizeof(*formats),MagickCompare); formats[i]=(char *) NULL; *number_formats=(unsigned long) i; @@ -777,7 +777,7 @@ static MagickBooleanType InitializeMagickList(ExceptionInfo *exception) { if (magick_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&magick_semaphore); - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); if ((magick_list == (SplayTreeInfo *) NULL) && (instantiate_magick == MagickFalse)) { @@ -819,7 +819,7 @@ static MagickBooleanType InitializeMagickList(ExceptionInfo *exception) #endif instantiate_magick=MagickTrue; } - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); } return(magick_list != (SplayTreeInfo *) NULL ? MagickTrue : MagickFalse); } @@ -1058,11 +1058,11 @@ MagickExport void MagickComponentTerminus(void) { if (magick_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&magick_semaphore); - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); if (magick_list != (SplayTreeInfo *) NULL) magick_list=DestroySplayTree(magick_list); instantiate_magick=MagickFalse; - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); DestroySemaphoreInfo(&magick_semaphore); } @@ -1465,7 +1465,7 @@ MagickExport MagickBooleanType UnregisterMagickInfo(const char *name) return(MagickFalse); if (GetNumberOfNodesInSplayTree(magick_list) == 0) return(MagickFalse); - LockSemaphoreInfo(magick_semaphore); + (void) LockSemaphoreInfo(magick_semaphore); ResetSplayTreeIterator(magick_list); p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); while (p != (const MagickInfo *) NULL) @@ -1475,6 +1475,6 @@ MagickExport MagickBooleanType UnregisterMagickInfo(const char *name) p=(const MagickInfo *) GetNextValueInSplayTree(magick_list); } status=DeleteNodeByValueFromSplayTree(magick_list,p); - UnlockSemaphoreInfo(magick_semaphore); + (void) UnlockSemaphoreInfo(magick_semaphore); return(status); } diff --git a/magick/memory.c b/magick/memory.c index 26f29ffbc..2529068b0 100644 --- a/magick/memory.c +++ b/magick/memory.c @@ -391,7 +391,7 @@ MagickExport void *AcquireMagickMemory(const size_t size) #else if (free_segments == (DataSegmentInfo *) NULL) { - LockSemaphoreInfo(memory_semaphore); + (void) LockSemaphoreInfo(memory_semaphore); if (free_segments == (DataSegmentInfo *) NULL) { register long @@ -411,16 +411,16 @@ MagickExport void *AcquireMagickMemory(const size_t size) } free_segments=(&memory_info.segment_pool[0]); } - UnlockSemaphoreInfo(memory_semaphore); + (void) UnlockSemaphoreInfo(memory_semaphore); } - LockSemaphoreInfo(memory_semaphore); + (void) LockSemaphoreInfo(memory_semaphore); memory=AcquireBlock(size == 0 ? 1UL : size); if (memory == (void *) NULL) { if (ExpandHeap(size == 0 ? 1UL : size) != MagickFalse) memory=AcquireBlock(size == 0 ? 1UL : size); } - UnlockSemaphoreInfo(memory_semaphore); + (void) UnlockSemaphoreInfo(memory_semaphore); #endif return(memory); } @@ -546,8 +546,8 @@ MagickExport void DestroyMagickMemory(void) register long i; - LockSemaphoreInfo(memory_semaphore); - UnlockSemaphoreInfo(memory_semaphore); + (void) LockSemaphoreInfo(memory_semaphore); + (void) UnlockSemaphoreInfo(memory_semaphore); for (i=0; i < (long) memory_info.number_segments; i++) if (memory_info.segments[i]->mapped == MagickFalse) memory_methods.destroy_memory_handler( @@ -742,7 +742,7 @@ MagickExport void *RelinquishMagickMemory(void *memory) #else assert((SizeOfBlock(memory) % (4*sizeof(size_t))) == 0); assert((*BlockHeader(NextBlock(memory)) & PreviousBlockBit) != 0); - LockSemaphoreInfo(memory_semaphore); + (void) LockSemaphoreInfo(memory_semaphore); if ((*BlockHeader(memory) & PreviousBlockBit) == 0) { void @@ -773,7 +773,7 @@ MagickExport void *RelinquishMagickMemory(void *memory) *BlockFooter(memory,SizeOfBlock(memory))=SizeOfBlock(memory); *BlockHeader(NextBlock(memory))&=(~PreviousBlockBit); InsertFreeBlock(memory,AllocationPolicy(SizeOfBlock(memory))); - UnlockSemaphoreInfo(memory_semaphore); + (void) UnlockSemaphoreInfo(memory_semaphore); #endif return((void *) NULL); } @@ -870,20 +870,20 @@ MagickExport void *ResizeMagickMemory(void *memory,const size_t size) if (block == (void *) NULL) memory=RelinquishMagickMemory(memory); #else - LockSemaphoreInfo(memory_semaphore); + (void) LockSemaphoreInfo(memory_semaphore); block=ResizeBlock(memory,size == 0 ? 1UL : size); if (block == (void *) NULL) { if (ExpandHeap(size == 0 ? 1UL : size) == MagickFalse) { - UnlockSemaphoreInfo(memory_semaphore); + (void) UnlockSemaphoreInfo(memory_semaphore); memory=RelinquishMagickMemory(memory); ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); } block=ResizeBlock(memory,size == 0 ? 1UL : size); assert(block != (void *) NULL); } - UnlockSemaphoreInfo(memory_semaphore); + (void) UnlockSemaphoreInfo(memory_semaphore); memory=RelinquishMagickMemory(memory); #endif return(block); diff --git a/magick/mime.c b/magick/mime.c index f472d210d..4f945a661 100644 --- a/magick/mime.c +++ b/magick/mime.c @@ -200,7 +200,7 @@ MagickExport const MimeInfo *GetMimeInfo(const char *filename, */ mime_info=(const MimeInfo *) NULL; lsb_first=1; - LockSemaphoreInfo(mime_semaphore); + (void) LockSemaphoreInfo(mime_semaphore); ResetLinkedListIterator(mime_list); p=(const MimeInfo *) GetNextValueInLinkedList(mime_list); while (p != (const MimeInfo *) NULL) @@ -324,7 +324,7 @@ MagickExport const MimeInfo *GetMimeInfo(const char *filename, if (p != (const MimeInfo *) NULL) (void) InsertValueInLinkedList(mime_list,0, RemoveElementByValueFromLinkedList(mime_list,p)); - UnlockSemaphoreInfo(mime_semaphore); + (void) UnlockSemaphoreInfo(mime_semaphore); return(mime_info); } @@ -408,7 +408,7 @@ MagickExport const MimeInfo **GetMimeInfoList(const char *pattern, /* Generate mime list. */ - LockSemaphoreInfo(mime_semaphore); + (void) LockSemaphoreInfo(mime_semaphore); ResetLinkedListIterator(mime_list); p=(const MimeInfo *) GetNextValueInLinkedList(mime_list); for (i=0; p != (const MimeInfo *) NULL; ) @@ -418,7 +418,7 @@ MagickExport const MimeInfo **GetMimeInfoList(const char *pattern, aliases[i++]=p; p=(const MimeInfo *) GetNextValueInLinkedList(mime_list); } - UnlockSemaphoreInfo(mime_semaphore); + (void) UnlockSemaphoreInfo(mime_semaphore); qsort((void *) aliases,(size_t) i,sizeof(*aliases),MimeInfoCompare); aliases[i]=(MimeInfo *) NULL; *number_aliases=(unsigned long) i; @@ -500,7 +500,7 @@ MagickExport char **GetMimeList(const char *pattern, GetNumberOfElementsInLinkedList(mime_list)+1UL,sizeof(*aliases)); if (aliases == (char **) NULL) return((char **) NULL); - LockSemaphoreInfo(mime_semaphore); + (void) LockSemaphoreInfo(mime_semaphore); ResetLinkedListIterator(mime_list); p=(const MimeInfo *) GetNextValueInLinkedList(mime_list); for (i=0; p != (const MimeInfo *) NULL; ) @@ -510,7 +510,7 @@ MagickExport char **GetMimeList(const char *pattern, aliases[i++]=ConstantString(p->type); p=(const MimeInfo *) GetNextValueInLinkedList(mime_list); } - UnlockSemaphoreInfo(mime_semaphore); + (void) UnlockSemaphoreInfo(mime_semaphore); qsort((void *) aliases,(size_t) i,sizeof(*aliases),MimeCompare); aliases[i]=(char *) NULL; *number_aliases=(unsigned long) i; @@ -606,14 +606,14 @@ static MagickBooleanType InitializeMimeList(ExceptionInfo *exception) { if (mime_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&mime_semaphore); - LockSemaphoreInfo(mime_semaphore); + (void) LockSemaphoreInfo(mime_semaphore); if ((mime_list == (LinkedListInfo *) NULL) && (instantiate_mime == MagickFalse)) { (void) LoadMimeLists(MimeFilename,exception); instantiate_mime=MagickTrue; } - UnlockSemaphoreInfo(mime_semaphore); + (void) UnlockSemaphoreInfo(mime_semaphore); } return(mime_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse); } @@ -1100,10 +1100,10 @@ MagickExport void MimeComponentTerminus(void) { if (mime_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&mime_semaphore); - LockSemaphoreInfo(mime_semaphore); + (void) LockSemaphoreInfo(mime_semaphore); if (mime_list != (LinkedListInfo *) NULL) mime_list=DestroyLinkedList(mime_list,DestroyMimeElement); instantiate_mime=MagickFalse; - UnlockSemaphoreInfo(mime_semaphore); + (void) UnlockSemaphoreInfo(mime_semaphore); DestroySemaphoreInfo(&mime_semaphore); } diff --git a/magick/module.c b/magick/module.c index 2d4d221d7..96329e55f 100644 --- a/magick/module.c +++ b/magick/module.c @@ -175,7 +175,7 @@ MagickExport void DestroyModuleList(void) /* Destroy magick modules. */ - LockSemaphoreInfo(module_semaphore); + (void) LockSemaphoreInfo(module_semaphore); #if defined(MAGICKCORE_MODULES_SUPPORT) if (module_list != (SplayTreeInfo *) NULL) module_list=DestroySplayTree(module_list); @@ -183,7 +183,7 @@ MagickExport void DestroyModuleList(void) (void) lt_dlexit(); #endif instantiate_module=MagickFalse; - UnlockSemaphoreInfo(module_semaphore); + (void) UnlockSemaphoreInfo(module_semaphore); } /* @@ -232,10 +232,10 @@ MagickExport ModuleInfo *GetModuleInfo(const char *tag,ExceptionInfo *exception) if (LocaleCompare(tag,"*") == 0) (void) OpenModules(exception); #endif - LockSemaphoreInfo(module_semaphore); + (void) LockSemaphoreInfo(module_semaphore); ResetSplayTreeIterator(module_list); p=(ModuleInfo *) GetNextValueInSplayTree(module_list); - UnlockSemaphoreInfo(module_semaphore); + (void) UnlockSemaphoreInfo(module_semaphore); return(p); } return((ModuleInfo *) GetValueFromSplayTree(module_list,tag)); @@ -319,7 +319,7 @@ MagickExport const ModuleInfo **GetModuleInfoList(const char *pattern, /* Generate module list. */ - LockSemaphoreInfo(module_semaphore); + (void) LockSemaphoreInfo(module_semaphore); ResetSplayTreeIterator(module_list); p=(const ModuleInfo *) GetNextValueInSplayTree(module_list); for (i=0; p != (const ModuleInfo *) NULL; ) @@ -329,7 +329,7 @@ MagickExport const ModuleInfo **GetModuleInfoList(const char *pattern, modules[i++]=p; p=(const ModuleInfo *) GetNextValueInSplayTree(module_list); } - UnlockSemaphoreInfo(module_semaphore); + (void) UnlockSemaphoreInfo(module_semaphore); qsort((void *) modules,(size_t) i,sizeof(*modules),ModuleInfoCompare); modules[i]=(ModuleInfo *) NULL; *number_modules=(unsigned long) i; @@ -849,7 +849,7 @@ MagickExport MagickBooleanType InitializeModuleList( { if (module_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&module_semaphore); - LockSemaphoreInfo(module_semaphore); + (void) LockSemaphoreInfo(module_semaphore); if ((module_list == (SplayTreeInfo *) NULL) && (instantiate_module == MagickFalse)) { @@ -875,7 +875,7 @@ MagickExport MagickBooleanType InitializeModuleList( "UnableToInitializeModuleLoader"); instantiate_module=MagickTrue; } - UnlockSemaphoreInfo(module_semaphore); + (void) UnlockSemaphoreInfo(module_semaphore); } return(module_list != (SplayTreeInfo *) NULL ? MagickTrue : MagickFalse); } diff --git a/magick/policy.c b/magick/policy.c index eb6c1046c..f57c442bf 100644 --- a/magick/policy.c +++ b/magick/policy.c @@ -192,7 +192,7 @@ static PolicyInfo *GetPolicyInfo(const char *name,ExceptionInfo *exception) /* Search for policy tag. */ - LockSemaphoreInfo(policy_semaphore); + (void) LockSemaphoreInfo(policy_semaphore); ResetLinkedListIterator(policy_list); p=(PolicyInfo *) GetNextValueInLinkedList(policy_list); while (p != (PolicyInfo *) NULL) @@ -207,7 +207,7 @@ static PolicyInfo *GetPolicyInfo(const char *name,ExceptionInfo *exception) else (void) InsertValueInLinkedList(policy_list,0, RemoveElementByValueFromLinkedList(policy_list,p)); - UnlockSemaphoreInfo(policy_semaphore); + (void) UnlockSemaphoreInfo(policy_semaphore); return(p); } @@ -267,7 +267,7 @@ MagickExport const PolicyInfo **GetPolicyInfoList(const char *pattern, /* Generate policy list. */ - LockSemaphoreInfo(policy_semaphore); + (void) LockSemaphoreInfo(policy_semaphore); ResetLinkedListIterator(policy_list); p=(const PolicyInfo *) GetNextValueInLinkedList(policy_list); for (i=0; p != (const PolicyInfo *) NULL; ) @@ -277,7 +277,7 @@ MagickExport const PolicyInfo **GetPolicyInfoList(const char *pattern, policies[i++]=p; p=(const PolicyInfo *) GetNextValueInLinkedList(policy_list); } - UnlockSemaphoreInfo(policy_semaphore); + (void) UnlockSemaphoreInfo(policy_semaphore); policies[i]=(PolicyInfo *) NULL; *number_policies=(unsigned long) i; return(policies); @@ -339,7 +339,7 @@ MagickExport char **GetPolicyList(const char *pattern, /* Generate policy list. */ - LockSemaphoreInfo(policy_semaphore); + (void) LockSemaphoreInfo(policy_semaphore); ResetLinkedListIterator(policy_list); p=(const PolicyInfo *) GetNextValueInLinkedList(policy_list); for (i=0; p != (const PolicyInfo *) NULL; ) @@ -349,7 +349,7 @@ MagickExport char **GetPolicyList(const char *pattern, policies[i++]=ConstantString(p->name); p=(const PolicyInfo *) GetNextValueInLinkedList(policy_list); } - UnlockSemaphoreInfo(policy_semaphore); + (void) UnlockSemaphoreInfo(policy_semaphore); policies[i]=(char *) NULL; *number_policies=(unsigned long) i; return(policies); @@ -430,14 +430,14 @@ static MagickBooleanType InitializePolicyList(ExceptionInfo *exception) { if (policy_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&policy_semaphore); - LockSemaphoreInfo(policy_semaphore); + (void) LockSemaphoreInfo(policy_semaphore); if ((policy_list == (LinkedListInfo *) NULL) && (instantiate_policy == MagickFalse)) { (void) LoadPolicyLists(PolicyFilename,exception); instantiate_policy=MagickTrue; } - UnlockSemaphoreInfo(policy_semaphore); + (void) UnlockSemaphoreInfo(policy_semaphore); } return(policy_list != (LinkedListInfo *) NULL ? MagickTrue : MagickFalse); } @@ -495,7 +495,7 @@ MagickExport MagickBooleanType IsRightsAuthorized(const PolicyDomain domain, if (policy_info == (PolicyInfo *) NULL) return(MagickTrue); authorized=MagickTrue; - LockSemaphoreInfo(policy_semaphore); + (void) LockSemaphoreInfo(policy_semaphore); ResetLinkedListIterator(policy_list); p=(PolicyInfo *) GetNextValueInLinkedList(policy_list); while ((p != (PolicyInfo *) NULL) && (authorized != MagickFalse)) @@ -515,7 +515,7 @@ MagickExport MagickBooleanType IsRightsAuthorized(const PolicyDomain domain, } p=(PolicyInfo *) GetNextValueInLinkedList(policy_list); } - UnlockSemaphoreInfo(policy_semaphore); + (void) UnlockSemaphoreInfo(policy_semaphore); return(authorized); } @@ -1015,10 +1015,10 @@ MagickExport void PolicyComponentTerminus(void) { if (policy_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&policy_semaphore); - LockSemaphoreInfo(policy_semaphore); + (void) LockSemaphoreInfo(policy_semaphore); if (policy_list != (LinkedListInfo *) NULL) policy_list=DestroyLinkedList(policy_list,DestroyPolicyElement); instantiate_policy=MagickFalse; - UnlockSemaphoreInfo(policy_semaphore); + (void) UnlockSemaphoreInfo(policy_semaphore); DestroySemaphoreInfo(&policy_semaphore); } diff --git a/magick/registry.c b/magick/registry.c index 5971965d7..ca5b0b4f4 100644 --- a/magick/registry.c +++ b/magick/registry.c @@ -326,13 +326,13 @@ MagickExport void RegistryComponentTerminus(void) { if (registry_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(®istry_semaphore); - LockSemaphoreInfo(registry_semaphore); + (void) LockSemaphoreInfo(registry_semaphore); if (IsEventLogging() != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); if (registry != (void *) NULL) registry=DestroySplayTree(registry); instantiate_registry=MagickFalse; - UnlockSemaphoreInfo(registry_semaphore); + (void) UnlockSemaphoreInfo(registry_semaphore); DestroySemaphoreInfo(®istry_semaphore); } @@ -527,7 +527,7 @@ MagickExport MagickBooleanType SetImageRegistry(const RegistryType type, { if (registry_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(®istry_semaphore); - LockSemaphoreInfo(registry_semaphore); + (void) LockSemaphoreInfo(registry_semaphore); if ((registry == (SplayTreeInfo *) NULL) && (instantiate_registry == MagickFalse)) { @@ -535,7 +535,7 @@ MagickExport MagickBooleanType SetImageRegistry(const RegistryType type, DestroyRegistryNode); instantiate_registry=MagickTrue; } - UnlockSemaphoreInfo(registry_semaphore); + (void) UnlockSemaphoreInfo(registry_semaphore); } status=AddValueToSplayTree(registry,ConstantString(key),registry_info); return(status); diff --git a/magick/resource.c b/magick/resource.c index 83c61b676..b2beb56e5 100644 --- a/magick/resource.c +++ b/magick/resource.c @@ -161,7 +161,7 @@ MagickExport MagickBooleanType AcquireMagickResource(const ResourceType type, (void) FormatMagickSize(size,resource_request); if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); switch (type) { case AreaResource: @@ -255,7 +255,7 @@ MagickExport MagickBooleanType AcquireMagickResource(const ResourceType type, default: break; } - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s", MagickOptionToMnemonic(MagickResourceOptions,(long) type),resource_request, resource_current,resource_limit); @@ -471,11 +471,11 @@ MagickExport int AcquireUniqueFileResource(char *path) return(file); if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); if (temporary_resources == (SplayTreeInfo *) NULL) temporary_resources=NewSplayTree(CompareSplayTreeString, RelinquishMagickMemory,DestroyTemporaryResources); - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); resource=ConstantString(path); (void) AddValueToSplayTree(temporary_resources,resource,resource); return(file); @@ -509,7 +509,7 @@ MagickExport MagickSizeType GetMagickResource(const ResourceType type) resource; resource=0; - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); switch (type) { case AreaResource: @@ -550,7 +550,7 @@ MagickExport MagickSizeType GetMagickResource(const ResourceType type) default: break; } - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); return(resource); } @@ -584,7 +584,7 @@ MagickExport MagickSizeType GetMagickResourceLimit(const ResourceType type) resource=0; if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); switch (type) { case AreaResource: @@ -625,7 +625,7 @@ MagickExport MagickSizeType GetMagickResourceLimit(const ResourceType type) default: break; } - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); return(resource); } @@ -668,7 +668,7 @@ MagickExport MagickBooleanType ListMagickResourceInfo(FILE *file, file=stdout; if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); (void) FormatMagickSize(resource_info.area_limit,area_limit); (void) FormatMagickSize(resource_info.memory_limit,memory_limit); (void) FormatMagickSize(resource_info.map_limit,map_limit); @@ -685,7 +685,7 @@ MagickExport MagickBooleanType ListMagickResourceInfo(FILE *file, (unsigned long) resource_info.file_limit,area_limit,memory_limit,map_limit, disk_limit,(unsigned long) resource_info.thread_limit,time_limit); (void) fflush(file); - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); return(MagickTrue); } @@ -725,7 +725,7 @@ MagickExport void RelinquishMagickResource(const ResourceType type, (void) FormatMagickSize(size,resource_request); if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); switch (type) { case AreaResource: @@ -790,7 +790,7 @@ MagickExport void RelinquishMagickResource(const ResourceType type, default: break; } - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s", MagickOptionToMnemonic(MagickResourceOptions,(long) type),resource_request, resource_current,resource_limit); @@ -1025,12 +1025,12 @@ MagickExport void ResourceComponentTerminus(void) { if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); if (temporary_resources != (SplayTreeInfo *) NULL) temporary_resources=DestroySplayTree(temporary_resources); if (random_info != (RandomInfo *) NULL) random_info=DestroyRandomInfo(random_info); - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); DestroySemaphoreInfo(&resource_semaphore); } @@ -1064,7 +1064,7 @@ MagickExport MagickBooleanType SetMagickResourceLimit(const ResourceType type, { if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); - LockSemaphoreInfo(resource_semaphore); + (void) LockSemaphoreInfo(resource_semaphore); switch (type) { case AreaResource: @@ -1106,6 +1106,6 @@ MagickExport MagickBooleanType SetMagickResourceLimit(const ResourceType type, default: break; } - UnlockSemaphoreInfo(resource_semaphore); + (void) UnlockSemaphoreInfo(resource_semaphore); return(MagickTrue); } diff --git a/magick/type.c b/magick/type.c index fde0b6439..97a890136 100644 --- a/magick/type.c +++ b/magick/type.c @@ -270,7 +270,7 @@ MagickExport const TypeInfo *GetTypeInfoByFamily(const char *family, (void) GetTypeInfo("*",exception); if (type_list == (SplayTreeInfo *) NULL) return((TypeInfo *) NULL); - LockSemaphoreInfo(type_semaphore); + (void) LockSemaphoreInfo(type_semaphore); ResetSplayTreeIterator(type_list); type_info=(const TypeInfo *) NULL; p=(const TypeInfo *) GetNextValueInSplayTree(type_list); @@ -315,14 +315,14 @@ MagickExport const TypeInfo *GetTypeInfoByFamily(const char *family, type_info=p; break; } - UnlockSemaphoreInfo(type_semaphore); + (void) UnlockSemaphoreInfo(type_semaphore); if (type_info != (const TypeInfo *) NULL) return(type_info); /* Check for types in the same family. */ max_score=0; - LockSemaphoreInfo(type_semaphore); + (void) LockSemaphoreInfo(type_semaphore); ResetSplayTreeIterator(type_list); p=(const TypeInfo *) GetNextValueInSplayTree(type_list); while (p != (const TypeInfo *) NULL) @@ -374,7 +374,7 @@ MagickExport const TypeInfo *GetTypeInfoByFamily(const char *family, } p=(const TypeInfo *) GetNextValueInSplayTree(type_list); } - UnlockSemaphoreInfo(type_semaphore); + (void) UnlockSemaphoreInfo(type_semaphore); if (type_info != (const TypeInfo *) NULL) return(type_info); /* @@ -485,7 +485,7 @@ MagickExport const TypeInfo **GetTypeInfoList(const char *pattern, /* Generate type list. */ - LockSemaphoreInfo(type_semaphore); + (void) LockSemaphoreInfo(type_semaphore); ResetSplayTreeIterator(type_list); p=(const TypeInfo *) GetNextValueInSplayTree(type_list); for (i=0; p != (const TypeInfo *) NULL; ) @@ -495,7 +495,7 @@ MagickExport const TypeInfo **GetTypeInfoList(const char *pattern, fonts[i++]=p; p=(const TypeInfo *) GetNextValueInSplayTree(type_list); } - UnlockSemaphoreInfo(type_semaphore); + (void) UnlockSemaphoreInfo(type_semaphore); qsort((void *) fonts,(size_t) i,sizeof(*fonts),TypeInfoCompare); fonts[i]=(TypeInfo *) NULL; *number_fonts=(unsigned long) i; @@ -578,7 +578,7 @@ MagickExport char **GetTypeList(const char *pattern,unsigned long *number_fonts, /* Generate type list. */ - LockSemaphoreInfo(type_semaphore); + (void) LockSemaphoreInfo(type_semaphore); ResetSplayTreeIterator(type_list); p=(const TypeInfo *) GetNextValueInSplayTree(type_list); for (i=0; p != (const TypeInfo *) NULL; ) @@ -588,7 +588,7 @@ MagickExport char **GetTypeList(const char *pattern,unsigned long *number_fonts, fonts[i++]=ConstantString(p->name); p=(const TypeInfo *) GetNextValueInSplayTree(type_list); } - UnlockSemaphoreInfo(type_semaphore); + (void) UnlockSemaphoreInfo(type_semaphore); qsort((void *) fonts,(size_t) i,sizeof(*fonts),TypeCompare); fonts[i]=(char *) NULL; *number_fonts=(unsigned long) i; @@ -773,7 +773,7 @@ static MagickBooleanType InitializeTypeList(ExceptionInfo *exception) { if (type_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&type_semaphore); - LockSemaphoreInfo(type_semaphore); + (void) LockSemaphoreInfo(type_semaphore); if ((type_list == (SplayTreeInfo *) NULL) && (instantiate_type == MagickFalse)) { @@ -786,7 +786,7 @@ static MagickBooleanType InitializeTypeList(ExceptionInfo *exception) #endif instantiate_type=MagickTrue; } - UnlockSemaphoreInfo(type_semaphore); + (void) UnlockSemaphoreInfo(type_semaphore); } return(type_list != (SplayTreeInfo *) NULL ? MagickTrue : MagickFalse); } @@ -1371,10 +1371,10 @@ MagickExport void TypeComponentTerminus(void) { if (type_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&type_semaphore); - LockSemaphoreInfo(type_semaphore); + (void) LockSemaphoreInfo(type_semaphore); if (type_list != (SplayTreeInfo *) NULL) type_list=DestroySplayTree(type_list); instantiate_type=MagickFalse; - UnlockSemaphoreInfo(type_semaphore); + (void) UnlockSemaphoreInfo(type_semaphore); DestroySemaphoreInfo(&type_semaphore); } diff --git a/wand/wand.c b/wand/wand.c index 37ec229f6..d40fcf656 100644 --- a/wand/wand.c +++ b/wand/wand.c @@ -78,7 +78,7 @@ WandExport unsigned long AcquireWandId(void) if (wand_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&wand_semaphore); - LockSemaphoreInfo(wand_semaphore); + (void) LockSemaphoreInfo(wand_semaphore); if ((wand_ids == (SplayTreeInfo *) NULL) && (instantiate_wand == MagickFalse)) { wand_ids=NewSplayTree((int (*)(const void *,const void *)) NULL, @@ -87,7 +87,7 @@ WandExport unsigned long AcquireWandId(void) } id++; (void) AddValueToSplayTree(wand_ids,(const void *) id,(const void *) id); - UnlockSemaphoreInfo(wand_semaphore); + (void) UnlockSemaphoreInfo(wand_semaphore); return(id); } @@ -113,11 +113,11 @@ WandExport unsigned long AcquireWandId(void) */ WandExport void DestroyWandIds(void) { - LockSemaphoreInfo(wand_semaphore); + (void) LockSemaphoreInfo(wand_semaphore); if (wand_ids != (SplayTreeInfo *) NULL) wand_ids=DestroySplayTree(wand_ids); instantiate_wand=MagickFalse; - UnlockSemaphoreInfo(wand_semaphore); + (void) UnlockSemaphoreInfo(wand_semaphore); DestroySemaphoreInfo(&wand_semaphore); } @@ -145,8 +145,8 @@ WandExport void DestroyWandIds(void) */ WandExport void RelinquishWandId(const unsigned long id) { - LockSemaphoreInfo(wand_semaphore); + (void) LockSemaphoreInfo(wand_semaphore); if (wand_ids != (SplayTreeInfo *) NULL) (void) DeleteNodeByValueFromSplayTree(wand_ids,(const void *) id); - UnlockSemaphoreInfo(wand_semaphore); + (void) UnlockSemaphoreInfo(wand_semaphore); } -- 2.50.1