libDtWidget: Resolve some static analyser warnings
prevent usage of potentially unitialised variables.
This commit is contained in:
@@ -508,6 +508,10 @@ CheckFile(
|
|||||||
else
|
else
|
||||||
file_changed = False;
|
file_changed = False;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
/* unsupported control type */
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_FileSize (g) = file_size;
|
G_FileSize (g) = file_size;
|
||||||
|
|||||||
@@ -3088,7 +3088,7 @@ Draw(
|
|||||||
else if (fill_mode == XmFILL_PARENT)
|
else if (fill_mode == XmFILL_PARENT)
|
||||||
gc = G_ParentBackgroundGC (g);
|
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,
|
XFillRectangle (d, drawable, gc, x + h_t, y + h_t,
|
||||||
w - 2 * h_t, h - 2 * h_t);
|
w - 2 * h_t, h - 2 * h_t);
|
||||||
|
|
||||||
@@ -3197,6 +3197,10 @@ Draw(
|
|||||||
? 0 : Min ((unsigned)G_StringHeight (g),
|
? 0 : Min ((unsigned)G_StringHeight (g),
|
||||||
G_Height (g) - s_y);
|
G_Height (g) - s_y);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
/* Unknown alignment */
|
||||||
|
clip.width = 0;
|
||||||
|
clip.height = 0;
|
||||||
}
|
}
|
||||||
if (clip.width > 0 && clip.height > 0)
|
if (clip.width > 0 && clip.height > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user