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] Avoid -Wduplicated-cond warnings in gdb/python
Date: Tue, 20 Sep 2016 21:40:00 -0000	[thread overview]
Message-ID: <12c58cd4dc805cbac97a6d93c971c2496313dce4@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 12c58cd4dc805cbac97a6d93c971c2496313dce4 ***

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

Avoid -Wduplicated-cond warnings in gdb/python

I tried building gdb with -Wduplicated-cond.  This patch fixes the
simpler issue that was found.

In Python 3, "int" and "long" are synonyms, so code like:

      else if (PyLong_Check (obj))
...
      else if (PyInt_Check (obj))

.... will trigger this warning.  The fix is to conditionalize the
PyInt_Check branches on Python 2.

Tested by rebuilding, with both version of Python, on x86-64 Fedora 24.

2016-09-20  Tom Tromey  <tom@tromey.com>

	* python/py-value.c (convert_value_from_python): Make PyInt_Check
	conditional on Python 2.
	* python/py-arch.c (archpy_disassemble): Make PyInt_Check
	conditional on Python 2.


             reply	other threads:[~2016-09-20 17:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 21:40 sergiodj+buildbot [this message]
2016-09-20 21:14 ` Failures on Fedora-x86_64-m32, branch master sergiodj+buildbot
2016-09-20 21:42 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2016-09-21 12:29 ` Failures on Debian-x86_64-m64, " sergiodj+buildbot
2016-09-21 12:41 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-09-21 12:41 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2016-09-21 12:41 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-09-21 12:46 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2016-09-21 13:02 ` Failures on Ubuntu-AArch64-native-gdbserver-m64, " sergiodj+buildbot
2016-09-21 13:04 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-09-21 13:11 ` Failures on Debian-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-09-21 13:16 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2016-09-21 13:16 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2016-09-21 13:16 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-09-21 13:17 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-09-21 13:54 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " 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=12c58cd4dc805cbac97a6d93c971c2496313dce4@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).