From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: <brobecker@adacore.com>, <gdb-patches@sourceware.org>,
<vinschen@redhat.com>
Subject: RE: [RFA] Fix cygwin32 failure introduced by [patch] windows-nat.c: Fix offset problem in signal string handling
Date: Wed, 27 Mar 2013 10:59:00 -0000 [thread overview]
Message-ID: <005501ce2ac8$ae830150$0b8903f0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <83y5d9xrqt.fsf@gnu.org>
Hi Eli,
> > ChangeLog entry:
> >
> > 2013-03-26 Pierre Muller <muller@sourceware.org>
> >
> > * windows-nat.c (handle_output_debug_string): Avoid typecast
> > from integer of different size warning.
> >
> >
> > Index: windows-nat.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/windows-nat.c,v
> > retrieving revision 1.245
> > diff -u -p -r1.245 windows-nat.c
> > --- windows-nat.c 23 Mar 2013 10:48:23 -0000 1.245
> > +++ windows-nat.c 26 Mar 2013 21:39:57 -0000
> > @@ -990,7 +990,7 @@ handle_output_debug_string (struct targe
> > retval = strtoul (p, &p, 0);
> > if (!retval)
> > retval = main_thread_id;
> > - else if ((x = (LPCVOID) strtoull (p, NULL, 0))
> > + else if ((x = (LPCVOID) (uintptr_t) strtoull (p, NULL, 0))
> > && ReadProcessMemory (current_process_handle, x,
> > &saved_context,
> > __COPY_CONTEXT_SIZE, &n)
>
> Is the cast to LPCVOID really needed? What if you drop it (and not
> add the cast to uintptr_t)?
Without any cast, I get this warning:
gcc -gstabs+ -O0 -I. -I../../src/gdb -I../../src/gdb/common
-I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/l
ocale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/..
-I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include
-I../libdecnumber -I../../src/gdb/../libdecnumber -I../../
src/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1
-I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wdeclara
tion-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign
-Wno-unused -Wunused-value -Wunused-function
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes
-Wdeclaration-after-statement -Wempty-body -Werror -c -o windows-n
at.o -MT windows-nat.o -MMD -MP -MF .deps/windows-nat.Tpo
../../src/gdb/windows-nat.c
cc1: warnings being treated as errors
../../src/gdb/windows-nat.c: In function 'handle_output_debug_string':
../../src/gdb/windows-nat.c:993:16: erreur: assignment makes pointer from
integer without a cast
Makefile:972: recipe for target `windows-nat.o' failed
make: *** [windows-nat.o] Error 1
Thus, I will commit the patch I proposed as Corinna already approved it.
Pierre Muller
next prev parent reply other threads:[~2013-03-27 8:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 16:24 Corinna Vinschen
2013-03-20 2:25 ` Joel Brobecker
2013-03-20 9:36 ` Corinna Vinschen
2013-03-27 4:59 ` [RFA] Fix cygwin32 failure introduced by " Pierre Muller
2013-03-27 7:53 ` Joel Brobecker
2013-03-27 10:47 ` Corinna Vinschen
2013-03-27 11:13 ` Pierre Muller
[not found] ` <000101ce2a6b$8c855a60$a5900f20$%muller@ics-cnrs.unistra.fr>
2013-03-27 10:02 ` Eli Zaretskii
2013-03-27 10:53 ` Corinna Vinschen
2013-03-27 10:59 ` Pierre Muller [this message]
[not found] ` <005501ce2ac8$ae830150$0b8903f0$%muller@ics-cnrs.unistra.fr>
2013-03-27 12:24 ` Eli Zaretskii
2013-03-27 14:39 ` Eli Zaretskii
2013-03-27 14:50 ` Eli Zaretskii
2013-03-27 15:23 ` Corinna Vinschen
2013-03-27 16:06 ` Eli Zaretskii
2013-03-27 16:45 ` Corinna Vinschen
2013-03-27 16:58 ` Eli Zaretskii
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='005501ce2ac8$ae830150$0b8903f0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=vinschen@redhat.com \
/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