From 5bcb756607536b724f21bbeee4842e3552b36f3d Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 6 Apr 2022 07:46:08 -0700 Subject: [PATCH] Quartz plugin quartz_format: squash -Wsign-conversion warning We know `device.id` is always a valid `format_type` because its only possible values are defined within this plugin. --- plugin/quartz/gvdevice_quartz.c | 4 +++- plugin/quartz/gvrender_quartz.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/quartz/gvdevice_quartz.c b/plugin/quartz/gvdevice_quartz.c index a4e4bad8c..ce0ad9612 100644 --- a/plugin/quartz/gvdevice_quartz.c +++ b/plugin/quartz/gvdevice_quartz.c @@ -34,7 +34,9 @@ static void quartz_format(GVJ_t *job) /* image destination -> data consumer -> job's gvdevice */ /* data provider <- job's imagedata */ CGDataConsumerRef data_consumer = CGDataConsumerCreate(job, &device_data_consumer_callbacks); - CGImageDestinationRef image_destination = CGImageDestinationCreateWithDataConsumer(data_consumer, format_to_uti(job->device.id), 1, NULL); + CGImageDestinationRef image_destination = + CGImageDestinationCreateWithDataConsumer(data_consumer, + format_to_uti((format_type)job->device.id), 1, NULL); CGDataProviderRef data_provider = CGDataProviderCreateDirect(job->imagedata, BYTES_PER_PIXEL * job->width * job->height, &memory_data_provider_callbacks); /* add the bitmap image to the destination and save it */ diff --git a/plugin/quartz/gvrender_quartz.c b/plugin/quartz/gvrender_quartz.c index 8d91c171e..1081a8b0c 100644 --- a/plugin/quartz/gvrender_quartz.c +++ b/plugin/quartz/gvrender_quartz.c @@ -86,9 +86,7 @@ static void quartzgen_end_job(GVJ_t * job) &device_data_consumer_callbacks); CGImageDestinationRef image_destination = CGImageDestinationCreateWithDataConsumer(data_consumer, - format_to_uti(job->device.id), - 1, - NULL); + format_to_uti((format_type)job->device.id), 1, NULL); /* add the bitmap image to the destination and save it */ CGImageRef image = CGBitmapContextCreateImage(context); -- 2.40.0