From: Paul Eggert Date: Tue, 16 Apr 2019 03:53:13 +0000 (-0700) Subject: Fix uninit var in widget.c X-Git-Tag: emacs-27.0.90~3240 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=debaa72dd89eee0dffc930a7ccff742ca5a81d88;p=emacs.git Fix uninit var in widget.c * src/widget.c (EmacsFrameQueryGeometry): Avoid use of uninitialized variables ok_width, ok_height (Bug#35277). --- diff --git a/src/widget.c b/src/widget.c index 508974dd46f..e662dd3ecdf 100644 --- a/src/widget.c +++ b/src/widget.c @@ -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;