commit 99867856700bf348e8cbf9c6274f441b06a08a1d
parent 22b274d9411c9467935c3c4b875f876e5bfcd1e7
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 13 Oct 2021 16:39:01 +0200
Fix compilation warnings detected by gcc 11
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scmap_palettes.c b/src/scmap_palettes.c
@@ -1797,7 +1797,7 @@ get_color(const size_t icolor, double color[3], void* context)
#define DEFINE_PALETTE(Palette) \
const struct scmap_palette scmap_palette_##Palette = { \
- get_color, sizeof(Palette)/sizeof(double[3]), (void*)Palette \
+ get_color, sizeof(Palette)/(sizeof(double)*3), (void*)Palette \
}
DEFINE_PALETTE(accent);
DEFINE_PALETTE(blues);
diff --git a/src/test_scmap_fetch_color.c b/src/test_scmap_fetch_color.c
@@ -29,7 +29,7 @@ static const double colors[] = {
0.4, 0.4, 0.4,
0.5, 0.5, 0.5
};
-static const size_t ncolors = sizeof(colors)/sizeof(double[3]);
+static const size_t ncolors = sizeof(colors)/(sizeof(double)*3);
static void
get_color(const size_t i, double col[3], void* context)