Skip to content

Commit

Permalink
eliminate compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 9, 2023
1 parent 96b27b4 commit 9c10890
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
34 changes: 17 additions & 17 deletions coders/heic.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
Forward declarations.
*/
static MagickBooleanType
WriteHEICImage(const ImageInfo *,Image *,ExceptionInfo *);
WriteHEICImage(const ImageInfo *,Image *);

/*x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -1168,7 +1168,7 @@ static MagickBooleanType WriteHEICImageRRGGBBAA(Image *image,
}

static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
Image *image)
{
MagickBooleanType
#if LIBHEIF_NUMERIC_VERSION > 0x01060200
Expand Down Expand Up @@ -1200,7 +1200,7 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
assert(image->signature == MagickCoreSignature);
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
scene=0;
Expand Down Expand Up @@ -1237,9 +1237,9 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
#endif
error=heif_context_get_encoder_for_format(heif_context,
heif_compression_HEVC,&heif_encoder);
if (IsHEIFSuccess(image,&error,exception) == MagickFalse)
if (IsHEIFSuccess(image,&error,&image->exception) == MagickFalse)
break;
status=IsHEIFSuccess(image,&error,exception);
status=IsHEIFSuccess(image,&error,&image->exception);
if (status == MagickFalse)
break;
chroma=lossless != MagickFalse ? heif_chroma_444 : heif_chroma_420;
Expand Down Expand Up @@ -1275,22 +1275,22 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
*/
error=heif_image_create((int) image->columns,(int) image->rows,colorspace,
chroma,&heif_image);
if (IsHEIFSuccess(image,&error,exception) == MagickFalse)
if (IsHEIFSuccess(image,&error,&image->exception) == MagickFalse)
break;
status=IsHEIFSuccess(image,&error,exception);
status=IsHEIFSuccess(image,&error,&image->exception);
if (status == MagickFalse)
break;
profile=GetImageProfile(image,"icc");
if (profile != (StringInfo *) NULL)
(void) heif_image_set_raw_color_profile(heif_image,"prof",
GetStringInfoDatum(profile),GetStringInfoLength(profile));
if (colorspace == heif_colorspace_YCbCr)
status=WriteHEICImageYCbCr(image,heif_image,exception);
status=WriteHEICImageYCbCr(image,heif_image,&image->exception);
else
if (image->depth > 8)
status=WriteHEICImageRRGGBBAA(image,heif_image,exception);
status=WriteHEICImageRRGGBBAA(image,heif_image,&image->exception);
else
status=WriteHEICImageRGBA(image,heif_image,exception);
status=WriteHEICImageRGBA(image,heif_image,&image->exception);
if (status == MagickFalse)
break;
/*
Expand All @@ -1301,7 +1301,7 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
else if (image_info->quality != UndefinedCompressionQuality)
error=heif_encoder_set_lossy_quality(heif_encoder,(int)
image_info->quality);
status=IsHEIFSuccess(image,&error,exception);
status=IsHEIFSuccess(image,&error,&image->exception);
if (status == MagickFalse)
break;
#if LIBHEIF_NUMERIC_VERSION > 0x01060200
Expand All @@ -1314,15 +1314,15 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
if (option != (char *) NULL)
{
error=heif_encoder_set_parameter(heif_encoder,"speed",option);
status=IsHEIFSuccess(image,&error,exception);
status=IsHEIFSuccess(image,&error,&image->exception);
if (status == MagickFalse)
break;
}
option=GetImageOption(image_info,"heic:chroma");
if (option != (char *) NULL)
{
error=heif_encoder_set_parameter(heif_encoder,"chroma",option);
status=IsHEIFSuccess(image,&error,exception);
status=IsHEIFSuccess(image,&error,&image->exception);
if (status == MagickFalse)
break;
}
Expand All @@ -1336,13 +1336,13 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
error=heif_context_encode_image(heif_context,heif_image,heif_encoder,
options,(struct heif_image_handle **) NULL);
heif_encoding_options_free(options);
if (IsHEIFSuccess(image,&error,exception) == MagickFalse)
if (IsHEIFSuccess(image,&error,&image->exception) == MagickFalse)
break;
status=IsHEIFSuccess(image,&error,exception);
status=IsHEIFSuccess(image,&error,&image->exception);
if (status == MagickFalse)
break;
if (image->profiles != (void *) NULL)
WriteProfile(heif_context,image,exception);
WriteProfile(heif_context,image,&image->exception);
if (GetNextImageInList(image) == (Image *) NULL)
break;
image=SyncNextImageInList(image);
Expand All @@ -1364,7 +1364,7 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,
writer.writer_api_version=1;
writer.write=heif_write_func;
error=heif_context_write(heif_context,&writer,image);
status=IsHEIFSuccess(image,&error,exception);
status=IsHEIFSuccess(image,&error,&image->exception);
}
if (heif_encoder != (struct heif_encoder*) NULL)
heif_encoder_release(heif_encoder);
Expand Down
2 changes: 1 addition & 1 deletion coders/pdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
return((Image *) NULL);
}
if (write(file," ",1) != 1)
;
{ };
file=close(file)-1;
/*
Render Postscript with the Ghostscript delegate.
Expand Down
15 changes: 8 additions & 7 deletions coders/webp.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
*/
#if defined(MAGICKCORE_WEBP_DELEGATE)
static MagickBooleanType
WriteWEBPImage(const ImageInfo *,Image *,ExceptionInfo *);
WriteWEBPImage(const ImageInfo *,Image *);
#endif

/*
Expand Down Expand Up @@ -1111,7 +1111,7 @@ static inline void SetIntegerOption(const ImageInfo *image_info,
}

static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
Image *image,ExceptionInfo * exception)
Image *image)
{
const char
*value;
Expand All @@ -1134,7 +1134,7 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
assert(image->signature == MagickCoreSignature);
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
if (status == MagickFalse)
return(status);
if ((image->columns > 16383UL) || (image->rows > 16383UL))
Expand Down Expand Up @@ -1215,12 +1215,12 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
(GetPreviousImageInList(image) == (Image *) NULL) &&
(GetNextImageInList(image) != (Image *) NULL))
status=WriteAnimatedWEBPImage(image_info,image,&configure,&webp_data,
exception);
&image->exception);
else
{
WebPMemoryWriterInit(&writer);
status=WriteSingleWEBPImage(image_info,image,&configure,&writer,
exception);
&image->exception);
if (status == MagickFalse)
WebPMemoryWriterClear(&writer);
else
Expand All @@ -1230,14 +1230,15 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
}
}
if (status != MagickFalse)
status=WriteWEBPImageProfile(image,&webp_data,exception);
status=WriteWEBPImageProfile(image,&webp_data,&image->exception);
if (status != MagickFalse)
(void) WriteBlob(image,webp_data.size,webp_data.bytes);
WebPDataClear(&webp_data);
}
#else
WebPMemoryWriterInit(&writer);
status=WriteSingleWEBPImage(image_info,image,&configure,&writer,exception);
status=WriteSingleWEBPImage(image_info,image,&configure,&writer,
&image->exception);
if (status != MagickFalse)
(void) WriteBlob(image,writer.size,writer.mem);
WebPMemoryWriterClear(&writer);
Expand Down
2 changes: 1 addition & 1 deletion magick/type.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static SplayTreeInfo *AcquireTypeCache(const char *filename,
if (GetNumberOfNodesInSplayTree(cache) == 0)
status&=LoadTypeCache(cache,TypeMap,"built-in",0,exception);
if (status == MagickFalse)
;
{ };
return(cache);
}

Expand Down

0 comments on commit 9c10890

Please sign in to comment.