From owner-svn-src-all@FreeBSD.ORG Sun Apr 7 05:53:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6E345B2B; Sun, 7 Apr 2013 05:53:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 45725605; Sun, 7 Apr 2013 05:53:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r375rhwK026841; Sun, 7 Apr 2013 05:53:43 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r375rhkt026840; Sun, 7 Apr 2013 05:53:43 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201304070553.r375rhkt026840@svn.freebsd.org> From: Tim Kientzle Date: Sun, 7 Apr 2013 05:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249223 - head/sys/boot/ficl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 05:53:43 -0000 Author: kientzle Date: Sun Apr 7 05:53:42 2013 New Revision: 249223 URL: http://svnweb.freebsd.org/changeset/base/249223 Log: The CELL fields can be various integer types depending on the platform (ARM uses 'int' and 'unsigned'; i386 uses 'long' and 'unsigned long'), so we need explicit casts to long and unsigned long here to ensure that the result matches the printf %ld and %lx specifiers. Modified: head/sys/boot/ficl/tools.c Modified: head/sys/boot/ficl/tools.c ============================================================================== --- head/sys/boot/ficl/tools.c Sun Apr 7 05:40:49 2013 (r249222) +++ head/sys/boot/ficl/tools.c Sun Apr 7 05:53:42 2013 (r249223) @@ -216,10 +216,11 @@ static void seeColon(FICL_VM *pVM, CELL { FICL_WORD *pLit = (FICL_WORD *)c.p; sprintf(cp, "%.*s ( %#lx literal )", - pLit->nName, pLit->name, c.u); + pLit->nName, pLit->name, (unsigned long)c.u); } else - sprintf(cp, "literal %ld (%#lx)", c.i, c.u); + sprintf(cp, "literal %ld (%#lx)", + (long)c.i, (unsigned long)c.u); break; case STRINGLIT: { @@ -281,7 +282,7 @@ static void seeColon(FICL_VM *pVM, CELL } else /* probably not a word - punt and print value */ { - sprintf(cp, "%ld ( %#lx )", pc->i, pc->u); + sprintf(cp, "%ld ( %#lx )", (long)pc->i, (unsigned long)pc->u); } vmTextOut(pVM, pVM->pad, 1); @@ -324,19 +325,22 @@ static void seeXT(FICL_VM *pVM) break; case VARIABLE: - sprintf(pVM->pad, "variable = %ld (%#lx)", pFW->param->i, pFW->param->u); + sprintf(pVM->pad, "variable = %ld (%#lx)", + (long)pFW->param->i, (unsigned long)pFW->param->u); vmTextOut(pVM, pVM->pad, 1); break; #if FICL_WANT_USER case USER: - sprintf(pVM->pad, "user variable %ld (%#lx)", pFW->param->i, pFW->param->u); + sprintf(pVM->pad, "user variable %ld (%#lx)", + (long)pFW->param->i, (unsigned long)pFW->param->u); vmTextOut(pVM, pVM->pad, 1); break; #endif case CONSTANT: - sprintf(pVM->pad, "constant = %ld (%#lx)", pFW->param->i, pFW->param->u); + sprintf(pVM->pad, "constant = %ld (%#lx)", + (long)pFW->param->i, (unsigned long)pFW->param->u); vmTextOut(pVM, pVM->pad, 1); default: