public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] add casts to avoid arithmetic on void *
@ 2016-04-27  0:26 sergiodj+buildbot
  2016-04-27  0:26 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master sergiodj+buildbot
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sergiodj+buildbot @ 2016-04-27  0:26 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 28cc9170c3d0bc0c5e82b45a10015e4bbcb01125 ***

Author: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Branch: master
Commit: 28cc9170c3d0bc0c5e82b45a10015e4bbcb01125

add casts to avoid arithmetic on void *

arithmetic on void * is undefined in ISO C, so we should avoid it.  In
GNU C sizeof void * is defined as 1, and that is pretty clearly what
this code wants, so change it to do arithmetic on bfd_byte *.
Unfortunately most of the argument types come from virtual function
interfaces so changing the types to bfd_byte * isn't trivial though it
might make the code clearer.  So for the moment its easiest to leave the
variable types as void * and cast before doing arithmetic.

bfd/ChangeLog:

2016-04-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
	* mmo.c (mmo_get_section_contents): Likewise.
	(mmo_set_section_contents): Likewise.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-04-27  3:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27  0:26 [binutils-gdb] add casts to avoid arithmetic on void * sergiodj+buildbot
2016-04-27  0:26 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master sergiodj+buildbot
2016-04-27  0:32 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-04-27  0:34 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2016-04-27  1:01 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2016-04-27  1:22 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2016-04-27  1:27 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-04-27  1:59 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-04-27  2:00 ` Failures on Debian-i686, " sergiodj+buildbot
2016-04-27  2:00 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot
2016-04-27  3:25 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot

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).