From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51075: 29.0.50; Uninitialised variable warning in src/term.c Date: Thu, 07 Oct 2021 12:18:14 +0100 Message-ID: <87zgrl2idl.fsf@tcd.ie> Reply-To: "Basil L. Contovounesios" Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4367"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert To: 51075@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 07 13:19:20 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYRQk-0000t6-NJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 13:19:20 +0200 Original-Received: from localhost ([::1]:38472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYRQj-00023D-79 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 07:19:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYRQV-00022Z-An for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 07:19:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYRQU-00032D-KM for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 07:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYRQT-0004qK-V8; Thu, 07 Oct 2021 07:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: eggert@cs.ucla.edu, bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2021 11:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51075 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Paul Eggert Original-Received: via spool by submit@debbugs.gnu.org id=B.163360550918573 (code B ref -1); Thu, 07 Oct 2021 11:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2021 11:18:29 +0000 Original-Received: from localhost ([127.0.0.1]:46190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYRPw-0004pV-Uq for submit@debbugs.gnu.org; Thu, 07 Oct 2021 07:18:29 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYRPu-0004pM-TR for submit@debbugs.gnu.org; Thu, 07 Oct 2021 07:18:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYRPu-0001CY-Fv for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 07:18:26 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:45783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYRPn-0002WO-37 for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 07:18:26 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id r10so17955123wra.12 for ; Thu, 07 Oct 2021 04:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=X1JnGy4foxVdC19tBSaCLcVT/baPctJ1SkIjMnD8LCs=; b=SfyqfQWckJcTPP06jK7kFXTi41w/vyxyNKTWHfIHXg2UTM/ddVYZanlbzevzeA6Fcj InJN7w7SCGQpGIKGGEVcmVvfHTzb54M+PsDsKlTVm1CoNQzpPVUOnIdn3Pw3EH84EKwS hUqRJlK5OwVV3C2+hFiF9LDbizpRQrVWD40gAS+8XSbTT2/e+tcjWyyolwqG9TIMXdJK Gtx5wCDgVdazJ01e+1lTqEEMo5m4gpciG2HjwuxCFhJ8d6TtrP+F/boOnAt3L2kUXBo9 IPq8qqmRxiglleyq+cYCTVRjELRtDR608WvbtMvL49QvKvohWqXXejHy4iAtF3o5C6fP mdwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=X1JnGy4foxVdC19tBSaCLcVT/baPctJ1SkIjMnD8LCs=; b=mlEhjBvEbIeLV6VX4RSj6WU4YZMEKf+uwc4+aELl7HEbxsbMfJ3cQcXMt6jO5WXFqC hlbETqT1m6kH0HcB50nFJjdNsKtvk5ky1gM5ygE0Tc2dUJt+Z/k4cptPUWMJhNQtfND+ 2TVmvyaW/Y4rGFF3LPmYK0cHlX8446CKlq3+wtxZF3vZYbMEqemxUOkySq+MJEWb9YLF lqA6l1ekVLwkxXtk0ju8Ne5LdyumJuZ6kxgVlQGc2U6B3v9LpBFEOKMMAiCJKTG2CaTI 923jLM9slgAs+SSIr5MVLVGpE+tYvg4+JayferAbzNkAzYfsmdOzjnu99RGk6PR/QZH7 P/XA== X-Gm-Message-State: AOAM531UF6HEPuPSyWjcJhapQEJLeuxvIhhiOtkRvCbLxNOZ2IA/M4F9 NgU5DB6xAl5thzEEoR3rPVVnQgIC1X1T7Q== X-Google-Smtp-Source: ABdhPJwjPrShlDlTuyPyabAluPWKMDtWfIyFgDUFkBick8sL9AxRF4OtoKaMoX2tKXRKJdV3wk9U4Q== X-Received: by 2002:a05:6000:1567:: with SMTP id 7mr4639865wrz.408.1633605495531; Thu, 07 Oct 2021 04:18:15 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id o6sm6124951wri.49.2021.10.07.04.18.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 04:18:15 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=contovob@tcd.ie; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216639 Archived-At: Severity: minor I'm currently seeing the following warning with GCC 10.3.0: In file included from term.c:30: term.c: In function =E2=80=98encode_terminal_code=E2=80=99: lisp.h:1853:35: warning: =E2=80=98gstring=E2=80=99 may be used uninitialize= d in this function [-Wmaybe-uninitialized] 1853 | return XVECTOR (array)->contents[idx]; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ term.c:553:16: note: =E2=80=98gstring=E2=80=99 was declared here 553 | Lisp_Object gstring; | ^~~~~~~ I'm guessing it started with the following recent change: Remove encode_terminal_code UNINITs 7e871dcd27 2021-10-03 17:52:28 -0700 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=3D7e871dcd27 What's the best way to pacify it? Do we care about doing so in GCC 10? Is cmp =3D composition_table[src->u.cmp.id]; indeed guaranteed to be non-NULL? If so, maybe gstring could be initialised as nil and then easserted as non-nil in the !cmp branch (eassuming cmp is non-NULL in the !src->u.cmp.automatic branch does not make the warning go away). If not, could there indeed be a bug? Thanks, --=20 Basil In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo versio= n 1.16.0, Xaw3d scroll bars) of 2021-10-07 built on tia Repository revision: e338effc774f9a7cfe13d4a35dc1cf493a22c972 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure 'CC=3Dccache gcc' 'CFLAGS=3D-Og -ggdb3' --config-cache --prefix /home/blc/.local --enable-checking=3Dstructs --with-x-toolkit=3Dlucid --with-file-notification=3Dyes --with-x' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date seq gv subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 50810 6940) (symbols 48 6621 1) (strings 32 18974 1858) (string-bytes 1 613497) (vectors 16 13616) (vector-slots 8 184446 10452) (floats 8 23 47) (intervals 56 231 0) (buffers 992 10))