public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Remove a warning from symtab.c
Date: Wed, 23 Jan 2019 17:48:00 -0000	[thread overview]
Message-ID: <ae73e2e2435cb706b18ba05734aee4137a271b3c@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT ae73e2e2435cb706b18ba05734aee4137a271b3c ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: ae73e2e2435cb706b18ba05734aee4137a271b3c

Remove a warning from symtab.c

When building symtab.c, I get:

../../binutils-gdb/gdb/language.h: In function void print_symbol_info(search_domain, symbol*, int, const char*):
../../binutils-gdb/gdb/language.h:738:20: warning: *((void*)& l +4) may be used uninitialized in this function [-Wmaybe-uninitialized]
       set_language (m_lang);
       ~~~~~~~~~~~~~^~~~~~~~
../../binutils-gdb/gdb/symtab.c:4613:41: note: *((void*)& l +4) was declared here
   scoped_switch_to_sym_language_if_auto l (sym);
                                         ^

This is another instance of the std::optional problem, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635.

However, it seemed straightforward and inexpensive to me to silence
this one, which is what this patch does.

gdb/ChangeLog
2019-01-23  Tom Tromey  <tom@tromey.com>

	* language.h (class scoped_switch_to_sym_language_if_auto):
	Initialize m_lang in both cases.


             reply	other threads:[~2019-01-23 17:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 17:48 sergiodj+buildbot [this message]
2019-01-23 17:48 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
2019-01-23 19:41 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2019-01-24  2:21 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2019-01-24  3:11 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2019-01-24  3:14 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2019-01-24  3:28 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2019-01-24  3:42 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2019-01-24  3:53 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2019-01-24  4:12 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae73e2e2435cb706b18ba05734aee4137a271b3c@gdb-build \
    --to=sergiodj+buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).