diff options
| author | Paul Eggert | 2019-04-15 20:53:13 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-04-15 20:53:36 -0700 |
| commit | debaa72dd89eee0dffc930a7ccff742ca5a81d88 (patch) | |
| tree | 6d4f1319ef1e0a3a41f0645b83b5d6cc9e334c3e /src/widget.c | |
| parent | a6b4c3bbeb6383c554e03a65fbdb7ee5994abdf7 (diff) | |
| download | emacs-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.c | 21 |
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 | ||
| 436 | static XtGeometryResult | 436 | static XtGeometryResult |
| 437 | EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result) | 437 | EmacsFrameQueryGeometry (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; |