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:
Carsten Haitzler 2013-12-13 20:21:53 +09:00
parent f745ac2591
commit 611714649b
1 changed files with 2 additions and 0 deletions

View File

@ -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 = (val << 8) | val;
xcl.blue = (unsigned short)(val);
xcl.pixel = 0;
xcl_in = xcl;
ret = XAllocColor(d, cmap, &xcl);
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.green = (unsigned short)(val);
xcl.blue = (unsigned short)(val);
xcl.pixel = 0;
xcl_in = xcl;
ret = XAllocColor(d, cmap, &xcl);
if ((ret == 0) ||