Commit debaa72d authored by Paul Eggert's avatar Paul Eggert

Fix uninit var in widget.c

* src/widget.c (EmacsFrameQueryGeometry):
Avoid use of uninitialized variables ok_width, ok_height (Bug#35277).
parent a6b4c3bb
Pipeline #1308 failed with stage
in 51 minutes and 36 seconds
......@@ -434,21 +434,20 @@ EmacsFrameResize (Widget widget)
}
static XtGeometryResult
EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result)
EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request,
XtWidgetGeometry *result)
{
EmacsFrame ew = (EmacsFrame) widget;
int mask = request->request_mode;
Dimension ok_width, ok_height;
if (mask & (CWWidth | CWHeight))
if (mask & (CWWidth | CWHeight) && !frame_resize_pixelwise)
{
if (!frame_resize_pixelwise)
round_size_to_char (ew,
(mask & CWWidth) ? request->width : ew->core.width,
((mask & CWHeight) ? request->height
: ew->core.height),
&ok_width, &ok_height);
EmacsFrame ew = (EmacsFrame) widget;
Dimension ok_width, ok_height;
round_size_to_char (ew,
mask & CWWidth ? request->width : ew->core.width,
mask & CWHeight ? request->height : ew->core.height,
&ok_width, &ok_height);
if ((mask & CWWidth) && (ok_width != request->width))
{
result->request_mode |= CWWidth;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment