From: dirk Date: Thu, 17 Mar 2016 22:07:42 +0000 (+0100) Subject: Fixes for unused parameters. X-Git-Tag: 7.0.1-0~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2a7a2d4a46c82a8679688ae763ef9d7bb53ccd7;p=imagemagick Fixes for unused parameters. --- diff --git a/Magick++/lib/Drawable.cpp b/Magick++/lib/Drawable.cpp index 1455eb775..d9eb12fa8 100644 --- a/Magick++/lib/Drawable.cpp +++ b/Magick++/lib/Drawable.cpp @@ -68,6 +68,7 @@ Magick::DrawableBase::~DrawableBase(void) void Magick::DrawableBase::operator()(MagickCore::DrawingWand * context_) const { + (void) context_; } Magick::DrawableBase* Magick::DrawableBase::copy() const diff --git a/MagickCore/blob.c b/MagickCore/blob.c index 0955ad837..df61ee89e 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -2736,6 +2736,8 @@ extern "C" { static size_t PingStream(const Image *magick_unused(image), const void *magick_unused(pixels),const size_t columns) { + (void) image; + (void) pixels; return(columns); } diff --git a/MagickCore/cache.c b/MagickCore/cache.c index fbbfde903..ff87e9442 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -480,8 +480,7 @@ MagickPrivate void ClonePixelCacheMethods(Cache clone,const Cache cache) */ static MagickBooleanType ClonePixelCacheOnDisk( - CacheInfo *magick_restrict cache_info,CacheInfo *magick_restrict clone_info, - ExceptionInfo *exception) + CacheInfo *magick_restrict cache_info,CacheInfo *magick_restrict clone_info) { MagickSizeType extent; @@ -584,7 +583,7 @@ static MagickBooleanType ClonePixelCacheRepository( return(MagickTrue); } if ((cache_info->type == DiskCache) && (clone_info->type == DiskCache)) - return(ClonePixelCacheOnDisk(cache_info,clone_info,exception)); + return(ClonePixelCacheOnDisk(cache_info,clone_info)); } /* Mismatched pixel cache morphology. diff --git a/MagickCore/constitute.c b/MagickCore/constitute.c index 7d15dd96f..2ec75d42b 100644 --- a/MagickCore/constitute.c +++ b/MagickCore/constitute.c @@ -197,6 +197,8 @@ extern "C" { static size_t PingStream(const Image *magick_unused(image), const void *magick_unused(pixels),const size_t columns) { + (void) image; + (void) pixels; return(columns); } diff --git a/MagickCore/draw.c b/MagickCore/draw.c index f893ff763..1c05b1e78 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -455,8 +455,7 @@ static void ReversePoints(PointInfo *points,const size_t number_points) } } -static PolygonInfo *ConvertPathToPolygon( - const DrawInfo *magick_unused(draw_info),const PathInfo *path_info) +static PolygonInfo *ConvertPathToPolygon(const PathInfo *path_info) { long direction, @@ -702,8 +701,7 @@ static void LogPathInfo(const PathInfo *path_info) (void) LogMagickEvent(DrawEvent,GetMagickModule()," end vector-path"); } -static PathInfo *ConvertPrimitiveToPath( - const DrawInfo *magick_unused(draw_info),const PrimitiveInfo *primitive_info) +static PathInfo *ConvertPrimitiveToPath(const PrimitiveInfo *primitive_info) { PathInfo *path_info; @@ -3642,7 +3640,7 @@ static PolygonInfo **DestroyPolygonThreadSet(PolygonInfo **polygon_info) return(polygon_info); } -static PolygonInfo **AcquirePolygonThreadSet(const DrawInfo *draw_info, +static PolygonInfo **AcquirePolygonThreadSet( const PrimitiveInfo *primitive_info) { PathInfo @@ -3663,12 +3661,12 @@ static PolygonInfo **AcquirePolygonThreadSet(const DrawInfo *draw_info, if (polygon_info == (PolygonInfo **) NULL) return((PolygonInfo **) NULL); (void) ResetMagickMemory(polygon_info,0,number_threads*sizeof(*polygon_info)); - path_info=ConvertPrimitiveToPath(draw_info,primitive_info); + path_info=ConvertPrimitiveToPath(primitive_info); if (path_info == (PathInfo *) NULL) return(DestroyPolygonThreadSet(polygon_info)); for (i=0; i < (ssize_t) number_threads; i++) { - polygon_info[i]=ConvertPathToPolygon(draw_info,path_info); + polygon_info[i]=ConvertPathToPolygon(path_info); if (polygon_info[i] == (PolygonInfo *) NULL) return(DestroyPolygonThreadSet(polygon_info)); } @@ -3890,7 +3888,7 @@ static MagickBooleanType DrawPolygonPrimitive(Image *image, assert(primitive_info != (PrimitiveInfo *) NULL); if (primitive_info->coordinates == 0) return(MagickTrue); - polygon_info=AcquirePolygonThreadSet(draw_info,primitive_info); + polygon_info=AcquirePolygonThreadSet(primitive_info); if (polygon_info == (PolygonInfo **) NULL) return(MagickFalse); DisableMSCWarning(4127) diff --git a/MagickCore/exception.c b/MagickCore/exception.c index b52236bc4..6ff4664cf 100644 --- a/MagickCore/exception.c +++ b/MagickCore/exception.c @@ -284,6 +284,8 @@ MagickExport ExceptionInfo *CloneExceptionInfo(ExceptionInfo *exception) static void DefaultErrorHandler(const ExceptionType magick_unused(severity), const char *reason,const char *description) { + (void) severity; + if (reason == (char *) NULL) return; (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason); @@ -366,6 +368,8 @@ static void DefaultFatalErrorHandler(const ExceptionType severity, static void DefaultWarningHandler(const ExceptionType magick_unused(severity), const char *reason,const char *description) { + (void) severity; + if (reason == (char *) NULL) return; (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason); diff --git a/MagickCore/locale.c b/MagickCore/locale.c index ccd083295..1f433b1b3 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -1137,6 +1137,8 @@ static void LocaleFatalErrorHandler( const ExceptionType magick_unused(severity), const char *reason,const char *description) { + (void) severity; + if (reason == (char *) NULL) return; (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason); diff --git a/MagickCore/log.c b/MagickCore/log.c index 139362ddc..b22c01189 100644 --- a/MagickCore/log.c +++ b/MagickCore/log.c @@ -923,9 +923,8 @@ MagickPrivate void LogComponentTerminus(void) % o format: the output format. % */ -static char *TranslateEvent(const LogEventType magick_unused(type), - const char *module,const char *function,const size_t line, - const char *domain,const char *event) +static char *TranslateEvent(const char *module,const char *function, + const size_t line,const char *domain,const char *event) { char *text; @@ -1287,7 +1286,7 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module, #endif if (n < 0) event[MagickPathExtent-1]='\0'; - text=TranslateEvent(type,module,function,line,domain,event); + text=TranslateEvent(module,function,line,domain,event); if (text == (char *) NULL) { (void) ContinueTimer((TimerInfo *) &log_info->timer); diff --git a/MagickCore/module.c b/MagickCore/module.c index 419f3f37f..9ea97baf9 100644 --- a/MagickCore/module.c +++ b/MagickCore/module.c @@ -102,7 +102,7 @@ static const ModuleInfo static MagickBooleanType GetMagickModulePath(const char *,MagickModuleType,char *,ExceptionInfo *), - IsModuleTreeInstantiated(ExceptionInfo *), + IsModuleTreeInstantiated(), UnregisterModule(const ModuleInfo *,ExceptionInfo *); static void @@ -218,7 +218,7 @@ MagickExport ModuleInfo *GetModuleInfo(const char *tag,ExceptionInfo *exception) ModuleInfo *module_info; - if (IsModuleTreeInstantiated(exception) == MagickFalse) + if (IsModuleTreeInstantiated() == MagickFalse) return((ModuleInfo *) NULL); LockSemaphoreInfo(module_semaphore); ResetSplayTreeIterator(module_list); @@ -840,11 +840,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename, % % The format of the IsModuleTreeInstantiated() method is: % -% IsModuleTreeInstantiated(Exceptioninfo *exception) -% -% A description of each parameter follows. -% -% o exception: return any errors or warnings in this structure. +% IsModuleTreeInstantiated() % */ @@ -868,8 +864,7 @@ static void *DestroyModuleNode(void *module_info) return(RelinquishMagickMemory(p)); } -static MagickBooleanType IsModuleTreeInstantiated( - ExceptionInfo *magick_unused(exception)) +static MagickBooleanType IsModuleTreeInstantiated() { if (module_list == (SplayTreeInfo *) NULL) { @@ -1161,17 +1156,12 @@ MagickExport MagickBooleanType ListModuleInfo(FILE *file, */ MagickPrivate MagickBooleanType ModuleComponentGenesis(void) { - ExceptionInfo - *exception; - MagickBooleanType status; if (module_semaphore == (SemaphoreInfo *) NULL) module_semaphore=AcquireSemaphoreInfo(); - exception=AcquireExceptionInfo(); - status=IsModuleTreeInstantiated(exception); - exception=DestroyExceptionInfo(exception); + status=IsModuleTreeInstantiated(); return(status); } diff --git a/MagickCore/nt-base.c b/MagickCore/nt-base.c index 9827edacc..76fa74c0c 100644 --- a/MagickCore/nt-base.c +++ b/MagickCore/nt-base.c @@ -2683,6 +2683,7 @@ MagickPrivate void NTWarningHandler(const ExceptionType severity, static LONG WINAPI NTUncaughtException(EXCEPTION_POINTERS *info) { + (void) info; AsynchronousResourceComponentTerminus(); return(EXCEPTION_CONTINUE_SEARCH); } diff --git a/MagickCore/opencl.c b/MagickCore/opencl.c index 6c95245a0..9548c2eaa 100644 --- a/MagickCore/opencl.c +++ b/MagickCore/opencl.c @@ -208,6 +208,10 @@ MagickPrivate void RecordProfileData(MagickCLEnv clEnv, ProfiledKernels kernel, profileRecords[kernel].count += 1; UnlockSemaphoreInfo(clEnv->commandQueuesLock); } +#else + (void) clEnv; + (void) kernel; + (void) event; #endif } diff --git a/MagickCore/property.c b/MagickCore/property.c index aea93b1d4..081e8de3b 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -415,8 +415,7 @@ MagickExport MagickBooleanType FormatImageProperty(Image *image, */ static char - *TracePSClippath(const unsigned char *,size_t,const size_t, - const size_t), + *TracePSClippath(const unsigned char *,size_t), *TraceSVGClippath(const unsigned char *,size_t,const size_t, const size_t); @@ -691,8 +690,7 @@ static MagickBooleanType Get8BIMProperty(const Image *image,const char *key, path=TraceSVGClippath((unsigned char *) attribute,(size_t) count, image->columns,image->rows); else - path=TracePSClippath((unsigned char *) attribute,(size_t) count, - image->columns,image->rows); + path=TracePSClippath((unsigned char *) attribute,(size_t) count); (void) SetImageProperty((Image *) image,key,(const char *) path, exception); path=DestroyString(path); @@ -1699,8 +1697,7 @@ static MagickBooleanType GetXMPProperty(const Image *image,const char *property) return(status); } -static char *TracePSClippath(const unsigned char *blob,size_t length, - const size_t magick_unused(columns),const size_t magick_unused(rows)) +static char *TracePSClippath(const unsigned char *blob,size_t length) { char *path, diff --git a/MagickCore/quantum-import.c b/MagickCore/quantum-import.c index 8aa766e2b..b3cdc7dc3 100644 --- a/MagickCore/quantum-import.c +++ b/MagickCore/quantum-import.c @@ -253,7 +253,7 @@ static inline const unsigned char *PushQuantumLongPixel( static void ImportAlphaQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -370,7 +370,7 @@ static void ImportAlphaQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportBGRQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -681,7 +681,7 @@ static void ImportBGRQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportBGRAQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -915,7 +915,7 @@ static void ImportBGRAQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportBGROQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -1270,7 +1270,7 @@ static void ImportBlackQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportBlueQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -1387,7 +1387,7 @@ static void ImportBlueQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportCbYCrYQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -2008,7 +2008,7 @@ static void ImportCMYKOQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportGrayQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -2323,7 +2323,7 @@ static void ImportGrayQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportGrayAlphaQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -2534,7 +2534,7 @@ static void ImportGrayAlphaQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportGreenQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -3078,7 +3078,7 @@ static void ImportIndexAlphaQuantum(const Image *image, static void ImportOpacityQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -3195,7 +3195,7 @@ static void ImportOpacityQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportRedQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -3312,7 +3312,7 @@ static void ImportRedQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportRGBQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -3623,7 +3623,7 @@ static void ImportRGBQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportRGBAQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -3857,7 +3857,7 @@ static void ImportRGBAQuantum(const Image *image,QuantumInfo *quantum_info, static void ImportRGBOQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, - Quantum *magick_restrict q,ExceptionInfo *exception) + Quantum *magick_restrict q) { QuantumAny range; @@ -4135,22 +4135,22 @@ MagickExport size_t ImportQuantumPixels(const Image *image, { case AlphaQuantum: { - ImportAlphaQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportAlphaQuantum(image,quantum_info,number_pixels,p,q); break; } case BGRQuantum: { - ImportBGRQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportBGRQuantum(image,quantum_info,number_pixels,p,q); break; } case BGRAQuantum: { - ImportBGRAQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportBGRAQuantum(image,quantum_info,number_pixels,p,q); break; } case BGROQuantum: { - ImportBGROQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportBGROQuantum(image,quantum_info,number_pixels,p,q); break; } case BlackQuantum: @@ -4161,7 +4161,7 @@ MagickExport size_t ImportQuantumPixels(const Image *image, case BlueQuantum: case YellowQuantum: { - ImportBlueQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportBlueQuantum(image,quantum_info,number_pixels,p,q); break; } case CMYKQuantum: @@ -4181,23 +4181,23 @@ MagickExport size_t ImportQuantumPixels(const Image *image, } case CbYCrYQuantum: { - ImportCbYCrYQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportCbYCrYQuantum(image,quantum_info,number_pixels,p,q); break; } case GrayQuantum: { - ImportGrayQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportGrayQuantum(image,quantum_info,number_pixels,p,q); break; } case GrayAlphaQuantum: { - ImportGrayAlphaQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportGrayAlphaQuantum(image,quantum_info,number_pixels,p,q); break; } case GreenQuantum: case MagentaQuantum: { - ImportGreenQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportGreenQuantum(image,quantum_info,number_pixels,p,q); break; } case IndexQuantum: @@ -4212,30 +4212,30 @@ MagickExport size_t ImportQuantumPixels(const Image *image, } case OpacityQuantum: { - ImportOpacityQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportOpacityQuantum(image,quantum_info,number_pixels,p,q); break; } case RedQuantum: case CyanQuantum: { - ImportRedQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportRedQuantum(image,quantum_info,number_pixels,p,q); break; } case RGBQuantum: case CbYCrQuantum: { - ImportRGBQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportRGBQuantum(image,quantum_info,number_pixels,p,q); break; } case RGBAQuantum: case CbYCrAQuantum: { - ImportRGBAQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportRGBAQuantum(image,quantum_info,number_pixels,p,q); break; } case RGBOQuantum: { - ImportRGBOQuantum(image,quantum_info,number_pixels,p,q,exception); + ImportRGBOQuantum(image,quantum_info,number_pixels,p,q); break; } default: diff --git a/MagickCore/thread-private.h b/MagickCore/thread-private.h index 6837bb4c1..5320139d1 100644 --- a/MagickCore/thread-private.h +++ b/MagickCore/thread-private.h @@ -43,7 +43,10 @@ extern "C" { #define MagickCachePrefetch(address,mode,locality) \ __builtin_prefetch(address,mode,locality) #else -#define MagickCachePrefetch(address,mode,locality) +#define MagickCachePrefetch(address,mode,locality) \ + (void) address; \ + (void) mode; \ + (void) locality; #endif #if defined(MAGICKCORE_THREAD_SUPPORT)