mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
Fix compiler warnings from texture.c v2
The patch fixes those 2 warnings below from texture.c.
It reverts the previous v1 patch and fixes the compiler warning
by updating the texture.h wTextureMakeIGradient header instead.
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[]);
|
This commit is contained in:
committed by
Carlos R. Mafra
parent
82ad19d420
commit
1d8b38b6e0
@@ -202,8 +202,8 @@ WTexGradient *wTextureMakeGradient(WScreen *scr, int style, const RColor *from,
|
||||
return texture;
|
||||
}
|
||||
|
||||
WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[],
|
||||
int thickness2, const RColor colors2[])
|
||||
WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[2],
|
||||
int thickness2, const RColor colors2[2])
|
||||
{
|
||||
WTexIGradient *texture;
|
||||
XGCValues gcv;
|
||||
|
||||
@@ -162,7 +162,7 @@ WTexSolid *wTextureMakeSolid(WScreen*, XColor*);
|
||||
WTexGradient *wTextureMakeGradient(WScreen*, int, const RColor*, const RColor*);
|
||||
WTexMGradient *wTextureMakeMGradient(WScreen*, int, RColor**);
|
||||
WTexTGradient *wTextureMakeTGradient(WScreen*, int, const RColor*, const RColor*, const char *, int);
|
||||
WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]);
|
||||
WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[2], int, const RColor[2]);
|
||||
WTexPixmap *wTextureMakePixmap(WScreen *scr, int style, const char *pixmap_file,
|
||||
XColor *color);
|
||||
void wTextureDestroy(WScreen*, WTexture*);
|
||||
|
||||
Reference in New Issue
Block a user