From: Ian Lance Taylor <iant@google.com>
To: Kai Tietz <ktietz70@googlemail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch prefix.c]: 4 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32
Date: Thu, 29 Nov 2012 18:18:00 -0000 [thread overview]
Message-ID: <CAKOQZ8x=wVy39K=ZPoy5rFsnazrHP8kAb8DSVCCuR6cAB7C-Mw@mail.gmail.com> (raw)
In-Reply-To: <CAEwic4Zz43j6U90a_bBks7P1-79Yu3PqyxxRqF2tVQzK5LRVvw@mail.gmail.com>
On Thu, Nov 29, 2012 at 4:09 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
>
> ChangeLog
>
> 2012-11-29 Kai Tietz
>
> PR target/53912
> * prefix.c (lookup_key): Explicit cast return-type of xmalloc/xrealloc
> to char *.
>
> Tested for i686-w64-mingw32, x86_64-w64-mingw32, and
> x86_64-unknown-gnu-linux. Ok for apply?
>
> Regards,
> Kai
>
> Index: prefix.c
> ===================================================================
> --- prefix.c (Revision 193925)
> +++ prefix.c (Arbeitskopie)
> @@ -157,12 +157,12 @@ lookup_key (char *key)
> }
>
> size = 32;
> - dst = xmalloc (size);
> + dst = (char *) xmalloc (size);
>
> res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
> if (res == ERROR_MORE_DATA && type == REG_SZ)
> {
> - dst = xrealloc (dst, size);
> + dst = (char *) xrealloc (dst, size);
> res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
> }
This code should be using the XNEWVEC and XRESIZEVEC macros.
Ian
next prev parent reply other threads:[~2012-11-29 18:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 12:09 Kai Tietz
2012-11-29 18:18 ` Ian Lance Taylor [this message]
2012-11-29 18:28 ` Kai Tietz
2012-11-29 18:33 ` Ian Lance Taylor
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='CAKOQZ8x=wVy39K=ZPoy5rFsnazrHP8kAb8DSVCCuR6cAB7C-Mw@mail.gmail.com' \
--to=iant@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ktietz70@googlemail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).