Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2018 07:56:59 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334025 - head/usr.bin/top
Message-ID:  <201805220756.w4M7uxDK036723@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Tue May 22 07:56:58 2018
New Revision: 334025
URL: https://svnweb.freebsd.org/changeset/base/334025

Log:
  top(1): increase size of 'status' buffer
  
  This corrects a warning issues by gcc9:
  /srv/src/freebsd/head/usr.bin/top/machine.c:988:22: warning: '%5zu'
  directive writing between 5 and 20 bytes into a
   region of size 15 [-Wformat-overflow=]
       sprintf(status, "?%5zu", state);

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

Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c	Tue May 22 07:20:22 2018	(r334024)
+++ head/usr.bin/top/machine.c	Tue May 22 07:56:58 2018	(r334025)
@@ -920,7 +920,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri
 	long cputime;
 	double pct;
 	struct handle *hp;
-	char status[16];
+	char status[22];
 	int cpu;
 	size_t state;
 	struct rusage ru, *rup;



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