forked from enlightenment/efl
evas - silence coverity in code
fixes CID 1039549 and CID 1039548 - though it isn't a bug, but means it should not come back in coverity.
This commit is contained in:
parent
f745ac2591
commit
611714649b
|
@ -70,6 +70,7 @@ x_color_alloc_rgb(int nr, int ng, int nb, Display *d, Colormap cmap, Visual *v)
|
||||||
val = (int)(((b * 255) / ((nb) - 1)));
|
val = (int)(((b * 255) / ((nb) - 1)));
|
||||||
val = (val << 8) | val;
|
val = (val << 8) | val;
|
||||||
xcl.blue = (unsigned short)(val);
|
xcl.blue = (unsigned short)(val);
|
||||||
|
xcl.pixel = 0;
|
||||||
xcl_in = xcl;
|
xcl_in = xcl;
|
||||||
ret = XAllocColor(d, cmap, &xcl);
|
ret = XAllocColor(d, cmap, &xcl);
|
||||||
dr = (int)xcl_in.red - (int)xcl.red;
|
dr = (int)xcl_in.red - (int)xcl.red;
|
||||||
|
@ -139,6 +140,7 @@ x_color_alloc_gray(int ng, Display *d, Colormap cmap, Visual *v)
|
||||||
xcl.red = (unsigned short)(val);
|
xcl.red = (unsigned short)(val);
|
||||||
xcl.green = (unsigned short)(val);
|
xcl.green = (unsigned short)(val);
|
||||||
xcl.blue = (unsigned short)(val);
|
xcl.blue = (unsigned short)(val);
|
||||||
|
xcl.pixel = 0;
|
||||||
xcl_in = xcl;
|
xcl_in = xcl;
|
||||||
ret = XAllocColor(d, cmap, &xcl);
|
ret = XAllocColor(d, cmap, &xcl);
|
||||||
if ((ret == 0) ||
|
if ((ret == 0) ||
|
||||||
|
|
Loading…
Reference in New Issue