aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget.c
diff options
context:
space:
mode:
authorPaul Eggert2019-04-15 20:53:13 -0700
committerPaul Eggert2019-04-15 20:53:36 -0700
commitdebaa72dd89eee0dffc930a7ccff742ca5a81d88 (patch)
tree6d4f1319ef1e0a3a41f0645b83b5d6cc9e334c3e /src/widget.c
parenta6b4c3bbeb6383c554e03a65fbdb7ee5994abdf7 (diff)
downloademacs-debaa72dd89eee0dffc930a7ccff742ca5a81d88.tar.gz
emacs-debaa72dd89eee0dffc930a7ccff742ca5a81d88.zip
Fix uninit var in widget.c
* src/widget.c (EmacsFrameQueryGeometry): Avoid use of uninitialized variables ok_width, ok_height (Bug#35277).
Diffstat (limited to 'src/widget.c')
-rw-r--r--src/widget.c21
1 files changed, 10 insertions, 11 deletions
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)
434} 434}
435 435
436static XtGeometryResult 436static XtGeometryResult
437EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result) 437EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request,
438 XtWidgetGeometry *result)
438{ 439{
439 EmacsFrame ew = (EmacsFrame) widget;
440
441 int mask = request->request_mode; 440 int mask = request->request_mode;
442 Dimension ok_width, ok_height;
443 441
444 if (mask & (CWWidth | CWHeight)) 442 if (mask & (CWWidth | CWHeight) && !frame_resize_pixelwise)
445 { 443 {
446 if (!frame_resize_pixelwise) 444 EmacsFrame ew = (EmacsFrame) widget;
447 round_size_to_char (ew, 445 Dimension ok_width, ok_height;
448 (mask & CWWidth) ? request->width : ew->core.width, 446
449 ((mask & CWHeight) ? request->height 447 round_size_to_char (ew,
450 : ew->core.height), 448 mask & CWWidth ? request->width : ew->core.width,
451 &ok_width, &ok_height); 449 mask & CWHeight ? request->height : ew->core.height,
450 &ok_width, &ok_height);
452 if ((mask & CWWidth) && (ok_width != request->width)) 451 if ((mask & CWWidth) && (ok_width != request->width))
453 { 452 {
454 result->request_mode |= CWWidth; 453 result->request_mode |= CWWidth;