From owner-svn-src-head@FreeBSD.ORG Thu Oct 31 18:53:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6D8E678E; Thu, 31 Oct 2013 18:53:40 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48E772856; Thu, 31 Oct 2013 18:53:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9VIreuM013832; Thu, 31 Oct 2013 18:53:40 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9VIreRs013831; Thu, 31 Oct 2013 18:53:40 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201310311853.r9VIreRs013831@svn.freebsd.org> From: Sean Bruno Date: Thu, 31 Oct 2013 18:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257464 - head/contrib/binutils/opcodes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 18:53:40 -0000 Author: sbruno Date: Thu Oct 31 18:53:39 2013 New Revision: 257464 URL: http://svnweb.freebsd.org/changeset/base/257464 Log: Queisce warning about attempting to add char * together and use explicit array indexing to indicate what is meant to be done Modified: head/contrib/binutils/opcodes/i386-dis.c Modified: head/contrib/binutils/opcodes/i386-dis.c ============================================================================== --- head/contrib/binutils/opcodes/i386-dis.c Thu Oct 31 18:53:13 2013 (r257463) +++ head/contrib/binutils/opcodes/i386-dis.c Thu Oct 31 18:53:39 2013 (r257464) @@ -3474,7 +3474,7 @@ static bfd_vma start_pc; * The function returns the length of this instruction in bytes. */ -static char intel_syntax; +static int intel_syntax; static char open_char; static char close_char; static char separator_char; @@ -3547,7 +3547,7 @@ print_insn (bfd_vma pc, disassemble_info else address_mode = mode_32bit; - if (intel_syntax == (char) -1) + if (intel_syntax == -1) intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax || info->mach == bfd_mach_x86_64_intel_syntax); @@ -4326,7 +4326,7 @@ dofloat (int sizeflag) static void OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { - oappend ("%st" + intel_syntax); + oappend (&"%st"[intel_syntax]); } static void @@ -4677,32 +4677,32 @@ append_seg (void) if (prefixes & PREFIX_CS) { used_prefixes |= PREFIX_CS; - oappend ("%cs:" + intel_syntax); + oappend (&"%cs:"[intel_syntax]); } if (prefixes & PREFIX_DS) { used_prefixes |= PREFIX_DS; - oappend ("%ds:" + intel_syntax); + oappend (&"%ds:"[intel_syntax]); } if (prefixes & PREFIX_SS) { used_prefixes |= PREFIX_SS; - oappend ("%ss:" + intel_syntax); + oappend (&"%ss:"[intel_syntax]); } if (prefixes & PREFIX_ES) { used_prefixes |= PREFIX_ES; - oappend ("%es:" + intel_syntax); + oappend (&"%es:"[intel_syntax]); } if (prefixes & PREFIX_FS) { used_prefixes |= PREFIX_FS; - oappend ("%fs:" + intel_syntax); + oappend (&"%fs:"[intel_syntax]); } if (prefixes & PREFIX_GS) { used_prefixes |= PREFIX_GS; - oappend ("%gs:" + intel_syntax); + oappend (&"%gs:"[intel_syntax]); } } @@ -5474,7 +5474,7 @@ OP_I (int bytemode, int sizeflag) op &= mask; scratchbuf[0] = '$'; print_operand_value (scratchbuf + 1, 1, op); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); scratchbuf[0] = '\0'; } @@ -5525,7 +5525,7 @@ OP_I64 (int bytemode, int sizeflag) op &= mask; scratchbuf[0] = '$'; print_operand_value (scratchbuf + 1, 1, op); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); scratchbuf[0] = '\0'; } @@ -5575,7 +5575,7 @@ OP_sI (int bytemode, int sizeflag) scratchbuf[0] = '$'; print_operand_value (scratchbuf + 1, 1, op); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -5755,7 +5755,7 @@ OP_ESreg (int code, int sizeflag) intel_operand_size (b_mode, sizeflag); } } - oappend ("%es:" + intel_syntax); + oappend (&"%es:"[intel_syntax]); ptr_reg (code, sizeflag); } @@ -5805,7 +5805,7 @@ OP_C (int dummy ATTRIBUTE_UNUSED, int si add = 8; } sprintf (scratchbuf, "%%cr%d", modrm.reg + add); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -5826,7 +5826,7 @@ static void OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { sprintf (scratchbuf, "%%tr%d", modrm.reg); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -5852,7 +5852,7 @@ OP_MMX (int bytemode ATTRIBUTE_UNUSED, i } else sprintf (scratchbuf, "%%mm%d", modrm.reg); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -5863,7 +5863,7 @@ OP_XMM (int bytemode ATTRIBUTE_UNUSED, i if (rex & REX_R) add = 8; sprintf (scratchbuf, "%%xmm%d", modrm.reg + add); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -5895,7 +5895,7 @@ OP_EM (int bytemode, int sizeflag) } else sprintf (scratchbuf, "%%mm%d", modrm.rm); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } /* cvt* are the only instructions in sse2 which have @@ -5922,7 +5922,7 @@ OP_EMC (int bytemode, int sizeflag) codep++; used_prefixes |= (prefixes & PREFIX_DATA); sprintf (scratchbuf, "%%mm%d", modrm.rm); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -5930,7 +5930,7 @@ OP_MXC (int bytemode ATTRIBUTE_UNUSED, i { used_prefixes |= (prefixes & PREFIX_DATA); sprintf (scratchbuf, "%%mm%d", modrm.reg); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -5950,7 +5950,7 @@ OP_EX (int bytemode, int sizeflag) MODRM_CHECK; codep++; sprintf (scratchbuf, "%%xmm%d", modrm.rm + add); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void @@ -6547,7 +6547,7 @@ static void XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED) { sprintf (scratchbuf, "%%xmm%d", reg); - oappend (scratchbuf + intel_syntax); + oappend (&scratchbuf[intel_syntax]); } static void