svn commit: r266773 - head/usr.bin/top

John Baldwin jhb at FreeBSD.org
Tue May 27 20:22:37 UTC 2014


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,


More information about the svn-src-head mailing list