From b19701eee91a3954aea62eebdebc60fecc85e5c6 Mon Sep 17 00:00:00 2001 From: Xerbo Date: Sat, 13 Jun 2020 10:55:24 +0100 Subject: [PATCH] Ignore -Wmissing-field-initializers to avoid confusion --- pngio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pngio.c b/pngio.c index 1f20d6e..0eb5c3e 100644 --- a/pngio.c +++ b/pngio.c @@ -293,6 +293,7 @@ int ImageOut(options_t *opts, image_t *img, int offset, int width, char *desc, c sprintf(outName, "%s/%s", opts->path, opts->filename); } + #pragma GCC diagnostic ignored "-Wunused-result" png_text meta[] = { {PNG_TEXT_COMPRESSION_NONE, "Software", VERSION}, {PNG_TEXT_COMPRESSION_NONE, "Channel", desc, sizeof(desc)}, @@ -384,12 +385,14 @@ int ImageOut(options_t *opts, image_t *img, int offset, int width, char *desc, c // Move prow into crow, crow ~ color rows, if required rgb_t *crow[img->nrow]; - if(!greyscale) + if(!greyscale){ prow2crow(img->prow, img->nrow, palette, crow); + } // Apply a user provided color palette - if(CONTAINS(opts->type, Palleted)) + if(CONTAINS(opts->type, Palleted)){ applyUserPalette(img->prow, img->nrow, opts->palette, crow); + } // Precipitation overlay if(CONTAINS(opts->effects, Precipitation_Overlay)){