From 82ad19d420d7776444e9a82deb9b5043f5ae6629 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Fri, 24 Feb 2023 19:24:45 +0800 Subject: [PATCH] Fix compiler warnings from texture.c The patch fixes those 2 warnings below from texture.c texture.c:205:81: warning: argument 3 of type 'const RColor[2]' with mismatched bound [-Warray-parameter=] 205 | WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[2], | ~~~~~~~~~~~~~^~~~~~~~~~ In file included from texture.c:33: texture.h:165:53: note: previously declared as 'const RColor[]' 165 | WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]); | ^~~~~~~~~~~~~~ texture.c:206:67: warning: argument 5 of type 'const RColor[2]' with mismatched bound [-Warray-parameter=] 206 | int thickness2, const RColor colors2[2]) | ~~~~~~~~~~~~~^~~~~~~~~~ texture.h:165:74: note: previously declared as 'const RColor[]' 165 | WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]); | --- src/texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/texture.c b/src/texture.c index e69fe485..45c9526a 100644 --- a/src/texture.c +++ b/src/texture.c @@ -202,8 +202,8 @@ WTexGradient *wTextureMakeGradient(WScreen *scr, int style, const RColor *from, return texture; } -WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[2], - int thickness2, const RColor colors2[2]) +WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[], + int thickness2, const RColor colors2[]) { WTexIGradient *texture; XGCValues gcv;