GNU bug report logs - #35277
26.1.90; Non-assigned variable used in condition

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Sun, 14 Apr 2019 17:23:02 UTC

Severity: normal

Fixed in version 26.1.90

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35277 in the body.
You can then email your comments to 35277 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35277; Package emacs. (Sun, 14 Apr 2019 17:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Óscar Fuentes <ofv <at> wanadoo.es>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 14 Apr 2019 17:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1.90; Non-assigned variable used in condition
Date: Sun, 14 Apr 2019 19:21:46 +0200
../../emacs/src/widget.c: In function ‘EmacsFrameQueryGeometry’:
../../emacs/src/widget.c:457:29: warning: ‘ok_height’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       if ((mask & CWHeight) && (ok_height != request->height))
           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../emacs/src/widget.c:455:18: warning: ‘ok_width’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    result->width = ok_width;
    ~~~~~~~~~~~~~~^~~~~~~~~~

I checked that the warnings are legit. With

(setq frame-resize-pixelwise t)

ok_width is used in the `if'. Not ok_height, at least on my experiments,
but removing the warning would be nice.

Note that the warning for `ok_width' points to the assignment, but it is
used right before on the `if'.


In GNU Emacs 26.1.90 (build 2, x86_64-pc-linux-gnu, X toolkit)
 of 2019-03-16 built on sky
Repository revision: df7ed10e4f15d3ea8b4426f7721bafe60bf8deeb
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description:	Debian GNU/Linux buster/sid

Recent messages:
Saving file /home/oscar/elisp/emacs.el...
Wrote /home/oscar/elisp/emacs.el
Auto-saving...done
Saving file /home/oscar/dev/emacs/emacs/src/widget.c...
Wrote /home/oscar/dev/emacs/emacs/src/widget.c
Saving file /home/oscar/dev/emacs/emacs/src/widget.c...
Wrote /home/oscar/dev/emacs/emacs/src/widget.c
[C-t] show common commands, [?] describe events, [C-h i] show manual
Saving file /home/oscar/elisp/emacs.el...
Wrote /home/oscar/elisp/emacs.el
Quit
Configured using:
 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid
 --with-modules'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GSETTINGS GLIB NOTIFY LIBSELINUX
GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB LUCID X11 XDBE XIM MODULES
THREADS

Important settings:
  value of $LANG: C
  locale-coding-system: nil




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 16 Apr 2019 03:59:01 GMT) Full text and rfc822 format available.

Notification sent to Óscar Fuentes <ofv <at> wanadoo.es>:
bug acknowledged by developer. (Tue, 16 Apr 2019 03:59:02 GMT) Full text and rfc822 format available.

Message #10 received at 35277-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Óscar Fuentes <ofv <at> wanadoo.es>
Cc: 35277-done <at> debbugs.gnu.org
Subject: 26.1.90; Non-assigned variable used in condition
Date: Mon, 15 Apr 2019 20:58:04 -0700
[Message part 1 (text/plain, inline)]
Thanks for reporting that. I installed the attached patch into Emacs master.
[0001-Fix-uninit-var-in-widget.c.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 May 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.