This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix for cr16 tools build issue with gcc 4.2.0


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]