Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2014 18:02:33 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264262 - head/sys/boot/ficl
Message-ID:  <201404081802.s38I2XMh040254@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Apr  8 18:02:32 2014
New Revision: 264262
URL: http://svnweb.freebsd.org/changeset/base/264262

Log:
  Fix printf args for 64-bit archs
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/boot/ficl/tools.c

Modified: head/sys/boot/ficl/tools.c
==============================================================================
--- head/sys/boot/ficl/tools.c	Tue Apr  8 17:50:27 2014	(r264261)
+++ head/sys/boot/ficl/tools.c	Tue Apr  8 18:02:32 2014	(r264262)
@@ -201,7 +201,7 @@ static void seeColon(FICL_VM *pVM, CELL 
 			*cp++ = '>';
 		else
 			*cp++ = ' ';
-        cp += sprintf(cp, "%3d   ", pc-param0);
+        cp += sprintf(cp, "%3d   ", (int)(pc-param0));
         
         if (isAFiclWord(pd, pFW))
         {
@@ -239,40 +239,40 @@ static void seeColon(FICL_VM *pVM, CELL 
             case IF:
                 c = *++pc;
                 if (c.i > 0)
-                    sprintf(cp, "if / while (branch %d)", pc+c.i-param0);
+                    sprintf(cp, "if / while (branch %d)", (int)(pc+c.i-param0));
                 else
-                    sprintf(cp, "until (branch %d)",      pc+c.i-param0);
+                    sprintf(cp, "until (branch %d)",      (int)(pc+c.i-param0));
                 break;                                                           
             case BRANCH:
                 c = *++pc;
                 if (c.i == 0)
-                    sprintf(cp, "repeat (branch %d)",     pc+c.i-param0);
+                    sprintf(cp, "repeat (branch %d)",     (int)(pc+c.i-param0));
                 else if (c.i == 1)
-                    sprintf(cp, "else (branch %d)",       pc+c.i-param0);
+                    sprintf(cp, "else (branch %d)",       (int)(pc+c.i-param0));
                 else
-                    sprintf(cp, "endof (branch %d)",       pc+c.i-param0);
+                    sprintf(cp, "endof (branch %d)",      (int)(pc+c.i-param0));
                 break;
 
             case OF:
                 c = *++pc;
-                sprintf(cp, "of (branch %d)",       pc+c.i-param0);
+                sprintf(cp, "of (branch %d)",       (int)(pc+c.i-param0));
                 break;
 
             case QDO:
                 c = *++pc;
-                sprintf(cp, "?do (leave %d)",  (CELL *)c.p-param0);
+                sprintf(cp, "?do (leave %d)",  (int)((CELL *)c.p-param0));
                 break;
             case DO:
                 c = *++pc;
-                sprintf(cp, "do (leave %d)", (CELL *)c.p-param0);
+                sprintf(cp, "do (leave %d)", (int)((CELL *)c.p-param0));
                 break;
             case LOOP:
                 c = *++pc;
-                sprintf(cp, "loop (branch %d)", pc+c.i-param0);
+                sprintf(cp, "loop (branch %d)", (int)(pc+c.i-param0));
                 break;
             case PLOOP:
                 c = *++pc;
-                sprintf(cp, "+loop (branch %d)", pc+c.i-param0);
+                sprintf(cp, "+loop (branch %d)", (int)(pc+c.i-param0));
                 break;
             default:
                 sprintf(cp, "%.*s", pFW->nName, pFW->name);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404081802.s38I2XMh040254>