From 2776f44d315e5e2606b0db42f6218128d2b0205f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bartoletti?= Date: Fri, 6 May 2022 07:49:04 +0200 Subject: [PATCH] Fix build with -Werror --- magick/log.c | 8 ++++---- magick/log.h | 6 +++--- magick/pixel-accessor.h | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/magick/log.c b/magick/log.c index 97f7b06f09..53fa90c53a 100644 --- a/magick/log.c +++ b/magick/log.c @@ -394,7 +394,7 @@ MagickExport void CloseMagickLog(void) % const char *GetLogEventMask(void) % */ -MagickExport const LogEventType GetLogEventMask(void) +MagickExport LogEventType GetLogEventMask(void) { ExceptionInfo *exception; @@ -515,7 +515,7 @@ static int LogInfoCompare(const void *x,const void *y) } #endif -MagickExport const LogInfo **GetLogInfoList(const char *pattern, +MagickExport LogInfo **GetLogInfoList(const char *pattern, size_t *number_preferences,ExceptionInfo *exception) { const LogInfo @@ -674,7 +674,7 @@ MagickExport char **GetLogList(const char *pattern, % const char *GetLogName(void) % */ -MagickExport const char *GetLogName(void) +MagickExport char *GetLogName(void) { return(log_name); } @@ -1930,7 +1930,7 @@ MagickExport void SetLogMethod(MagickLogMethod method) % o name: Specifies the new client name. % */ -MagickExport const char *SetLogName(const char *name) +MagickExport char *SetLogName(const char *name) { if ((name != (char *) NULL) && (*name != '\0')) (void) CopyMagickString(log_name,name,MaxTextExtent); diff --git a/magick/log.h b/magick/log.h index fcef980167..f70298d9d2 100644 --- a/magick/log.h +++ b/magick/log.h @@ -66,14 +66,14 @@ typedef void extern MagickExport char **GetLogList(const char *,size_t *,ExceptionInfo *); -extern MagickExport const char +extern MagickExport char *GetLogName(void) magick_attribute((__pure__)), *SetLogName(const char *); -extern MagickExport const LogEventType +extern MagickExport LogEventType GetLogEventMask(void) magick_attribute((__pure__)); -extern MagickExport const LogInfo +extern MagickExport LogInfo **GetLogInfoList(const char *,size_t *,ExceptionInfo *); extern MagickExport LogEventType diff --git a/magick/pixel-accessor.h b/magick/pixel-accessor.h index 27b8f3938a..c2c92308ca 100644 --- a/magick/pixel-accessor.h +++ b/magick/pixel-accessor.h @@ -103,12 +103,12 @@ extern "C" { #define SetPixelYellow(pixel,value) ((pixel)->blue=(Quantum) (value)) #define SetPixelY(pixel,value) ((pixel)->red=(Quantum) (value)) -static inline const MagickRealType AbsolutePixelValue(const MagickRealType x) +static inline MagickRealType AbsolutePixelValue(const MagickRealType x) { return(x < 0.0f ? -x : x); } -static inline const Quantum ClampPixel(const MagickRealType value) +static inline Quantum ClampPixel(const MagickRealType value) { if (value < 0.0f) return((Quantum) 0); @@ -121,7 +121,7 @@ static inline const Quantum ClampPixel(const MagickRealType value) #endif } -static inline const double PerceptibleReciprocal(const double x) +static inline double PerceptibleReciprocal(const double x) { double sign; @@ -135,7 +135,7 @@ static inline const double PerceptibleReciprocal(const double x) return(sign/MagickEpsilon); } -static inline const MagickRealType GetPixelLuma( +static inline MagickRealType GetPixelLuma( const Image *magick_restrict image,const PixelPacket *magick_restrict pixel) { MagickRealType @@ -147,7 +147,7 @@ static inline const MagickRealType GetPixelLuma( return(intensity); } -static inline const MagickRealType GetPixelLuminance( +static inline MagickRealType GetPixelLuminance( const Image *magick_restrict image,const PixelPacket *magick_restrict pixel) { MagickRealType @@ -165,7 +165,7 @@ static inline const MagickRealType GetPixelLuminance( return(intensity); } -static inline const MagickBooleanType IsPixelAtDepth(const Quantum pixel, +static inline MagickBooleanType IsPixelAtDepth(const Quantum pixel, const QuantumAny range) { Quantum @@ -183,7 +183,7 @@ static inline const MagickBooleanType IsPixelAtDepth(const Quantum pixel, return(pixel == quantum ? MagickTrue : MagickFalse); } -static inline const MagickBooleanType IsPixelGray(const PixelPacket *pixel) +static inline MagickBooleanType IsPixelGray(const PixelPacket *pixel) { MagickRealType green_blue, @@ -197,7 +197,7 @@ static inline const MagickBooleanType IsPixelGray(const PixelPacket *pixel) return(MagickFalse); } -static inline const MagickBooleanType IsPixelMonochrome( +static inline MagickBooleanType IsPixelMonochrome( const PixelPacket *pixel) { MagickRealType @@ -217,7 +217,7 @@ static inline const MagickBooleanType IsPixelMonochrome( return(MagickFalse); } -static inline const Quantum PixelPacketIntensity(const PixelPacket *pixel) +static inline Quantum PixelPacketIntensity(const PixelPacket *pixel) { MagickRealType intensity;