Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2014 20:22:36 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266773 - head/usr.bin/top
Message-ID:  <201405272022.s4RKMacK006427@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue May 27 20:22:36 2014
New Revision: 266773
URL: http://svnweb.freebsd.org/changeset/base/266773

Log:
  Fix a couple of size_t != int warnings.

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c	Tue May 27 19:56:02 2014	(r266772)
+++ head/usr.bin/top/machine.c	Tue May 27 20:22:36 2014	(r266773)
@@ -916,7 +916,7 @@ format_next_process(caddr_t handle, char
 			argbuflen = cmdlen * 4;
 			argbuf = (char *)malloc(argbuflen + 1);
 			if (argbuf == NULL) {
-				warn("malloc(%d)", argbuflen + 1);
+				warn("malloc(%zd)", argbuflen + 1);
 				free(cmdbuf);
 				return NULL;
 			}
@@ -1023,7 +1023,7 @@ format_next_process(caddr_t handle, char
 		thr_buf[0] = '\0';
 	else
 		snprintf(thr_buf, sizeof(thr_buf), "%*d ",
-		    sizeof(thr_buf) - 2, pp->ki_numthreads);
+		    (int)(sizeof(thr_buf) - 2), pp->ki_numthreads);
 
 	snprintf(fmt, sizeof(fmt), proc_fmt,
 	    pp->ki_pid,



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