1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

libDtWidget: Resolve some static analyser warnings

prevent usage of potentially unitialised variables.
This commit is contained in:
Peter Howkins 2014-12-23 20:05:01 +00:00
parent e54c164fe1
commit 407aa2c4b7
2 changed files with 9 additions and 1 deletions

View file

@ -508,6 +508,10 @@ CheckFile(
else
file_changed = False;
break;
default:
/* unsupported control type */
return;
}
G_FileSize (g) = file_size;

View file

@ -3088,7 +3088,7 @@ Draw(
else if (fill_mode == XmFILL_PARENT)
gc = G_ParentBackgroundGC (g);
if ((fill_mode != XmFILL_NONE) && (fill_mode != XmFILL_TRANSPARENT))
if ((fill_mode == XmFILL_SELF) || (fill_mode == XmFILL_PARENT))
XFillRectangle (d, drawable, gc, x + h_t, y + h_t,
w - 2 * h_t, h - 2 * h_t);
@ -3197,6 +3197,10 @@ Draw(
? 0 : Min ((unsigned)G_StringHeight (g),
G_Height (g) - s_y);
break;
default:
/* Unknown alignment */
clip.width = 0;
clip.height = 0;
}
if (clip.width > 0 && clip.height > 0)
{