Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2011 14:51:25 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228629 - head/usr.bin/gprof
Message-ID:  <201112171451.pBHEpPtM063602@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Dec 17 14:51:24 2011
New Revision: 228629
URL: http://svn.freebsd.org/changeset/base/228629

Log:
  More fixes for correct printf length modifiers usr.bin/gprof.
  
  MFC after:	1 week

Modified:
  head/usr.bin/gprof/aout.c
  head/usr.bin/gprof/arcs.c

Modified: head/usr.bin/gprof/aout.c
==============================================================================
--- head/usr.bin/gprof/aout.c	Sat Dec 17 14:37:41 2011	(r228628)
+++ head/usr.bin/gprof/aout.c	Sat Dec 17 14:51:24 2011	(r228629)
@@ -134,7 +134,7 @@ getsymtab(FILE *nfile, const char *filen
     askfor = nname + 1;
     nl = (nltype *) calloc( askfor , sizeof(nltype) );
     if (nl == 0)
-	errx( 1 , "no room for %d bytes of symbol table" ,
+	errx( 1 , "no room for %zu bytes of symbol table" ,
 		askfor * sizeof(nltype) );
 
     /* pass2 - read symbols */

Modified: head/usr.bin/gprof/arcs.c
==============================================================================
--- head/usr.bin/gprof/arcs.c	Sat Dec 17 14:37:41 2011	(r228628)
+++ head/usr.bin/gprof/arcs.c	Sat Dec 17 14:51:24 2011	(r228629)
@@ -378,7 +378,7 @@ cyclelink()
 	 */
     cyclenl = (nltype *) calloc( ncycle + 1 , sizeof( nltype ) );
     if ( cyclenl == 0 )
-	errx( 1 , "no room for %d bytes of cycle headers" ,
+	errx( 1 , "no room for %zu bytes of cycle headers" ,
 		   ( ncycle + 1 ) * sizeof( nltype ) );
 	/*
 	 *	now link cycles to true cycleheads,
@@ -481,7 +481,7 @@ cycleanalyze()
 	done = FALSE;
         cyclestack = (arctype **) calloc( size + 1 , sizeof( arctype *) );
 	if ( cyclestack == 0 )
-	    errx( 1, "no room for %d bytes of cycle stack" ,
+	    errx( 1, "no room for %zu bytes of cycle stack" ,
 			   ( size + 1 ) * sizeof( arctype * ) );
 #	ifdef DEBUG
 	    if ( debug & BREAKCYCLE ) {
@@ -599,7 +599,7 @@ addcycle( stkstart , stkend )
     clp = (cltype *)
 	calloc( 1 , sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
     if ( clp == 0 ) {
-	warnx( "no room for %d bytes of subcycle storage" ,
+	warnx( "no room for %zu bytes of subcycle storage" ,
 	    sizeof ( cltype ) + ( size - 1 ) * sizeof( arctype * ) );
 	return( FALSE );
     }



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