* [PATCH] Fix for cr16 tools build issue with gcc 4.2.0
@ 2007-07-04 12:53 M R Swami Reddy
2007-07-04 14:43 ` Nick Clifton
0 siblings, 1 reply; 3+ messages in thread
From: M R Swami Reddy @ 2007-07-04 12:53 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
Hi,
CR16 binutil tools build failed with GCC 4.2.0 native compiler to compile
the binutils-2.17.50/opcodes/cr16-dis.c file with a warning (warnings are
treated as errors). Therefore, fixed the warning by changing the signature
of function from
static char *getcinvstring (char *);
to
static char *getcinvstring (const char *);
Attached the patch file (File name: cr16_cr16-dis.c.patch) here.
Could you please review and approve the same. Thanks in advance.
Thanks,
Swami
===============
M R Swami Reddy
CR Tools Dev Team
National Semiconductor
[-- Attachment #2: cr16_cr16-dis.c.patch --]
[-- Type: text/plain, Size: 1356 bytes --]
diff -Napr binutils-2.17.50/opcodes/cr16-dis.c binutils-2.17.50-cr16/opcodes/cr16-dis.c
*** binutils-2.17.50/opcodes/cr16-dis.c 2007-06-29 19:39:34.000000000 +0530
--- binutils-2.17.50-cr16/opcodes/cr16-dis.c 2007-07-03 17:41:14.000000000 +0530
*************** getccstring (unsigned cc)
*** 172,178 ****
string. This routine is used when disassembling the 'cinv' instruction. */
static char *
! getcinvstring (char *str)
{
const cinv_entry *cinv;
--- 172,178 ----
string. This routine is used when disassembling the 'cinv' instruction. */
static char *
! getcinvstring (const char *str)
{
const cinv_entry *cinv;
*************** print_insn_cr16 (bfd_vma memaddr, struct
*** 799,805 ****
if (is_decoded > 0 && (words[0] << 16 || words[1]) != 0)
{
if (strneq (instruction->mnemonic, "cinv", 4))
! info->fprintf_func (info->stream,"%s", getcinvstring ((char *)instruction->mnemonic));
else
info->fprintf_func (info->stream, "%s", instruction->mnemonic);
--- 799,805 ----
if (is_decoded > 0 && (words[0] << 16 || words[1]) != 0)
{
if (strneq (instruction->mnemonic, "cinv", 4))
! info->fprintf_func (info->stream,"%s", getcinvstring (instruction->mnemonic));
else
info->fprintf_func (info->stream, "%s", instruction->mnemonic);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix for cr16 tools build issue with gcc 4.2.0
2007-07-04 12:53 [PATCH] Fix for cr16 tools build issue with gcc 4.2.0 M R Swami Reddy
@ 2007-07-04 14:43 ` Nick Clifton
2007-07-05 8:06 ` M R Swami Reddy
0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2007-07-04 14:43 UTC (permalink / raw)
To: M R Swami Reddy; +Cc: binutils
Hi Swami,
> CR16 binutil tools build failed with GCC 4.2.0 native compiler to compile
> the binutils-2.17.50/opcodes/cr16-dis.c file with a warning (warnings
> are treated as errors).
I have applied your patch. One thing though - you did not provide a
ChangeLog entry, so I have invented one for you.
Cheers
Nick
opcodes/ChangeLog
2007-07-04 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* cr16-dis.c (getcinvstring): Add const qualifier to char *
parameter.
(print_insn_cr16): Remove cast to char *.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix for cr16 tools build issue with gcc 4.2.0
2007-07-04 14:43 ` Nick Clifton
@ 2007-07-05 8:06 ` M R Swami Reddy
0 siblings, 0 replies; 3+ messages in thread
From: M R Swami Reddy @ 2007-07-05 8:06 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
Hi Nick,
Thanks a lot.
Thanks,
Swami
Nick Clifton wrote:
> Hi Swami,
>
>> CR16 binutil tools build failed with GCC 4.2.0 native compiler to compile
>> the binutils-2.17.50/opcodes/cr16-dis.c file with a warning (warnings
>> are treated as errors).
>
> I have applied your patch. One thing though - you did not provide a
> ChangeLog entry, so I have invented one for you.
>
> Cheers
> Nick
>
> opcodes/ChangeLog
> 2007-07-04 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
>
> * cr16-dis.c (getcinvstring): Add const qualifier to char *
> parameter.
> (print_insn_cr16): Remove cast to char *.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-05 5:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-04 12:53 [PATCH] Fix for cr16 tools build issue with gcc 4.2.0 M R Swami Reddy
2007-07-04 14:43 ` Nick Clifton
2007-07-05 8:06 ` M R Swami Reddy
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).