]> granicus.if.org Git - procps-ng/commitdiff
top: banish one more warning for '-Wformat-truncation'
authorJim Warner <james.warner@comcast.net>
Thu, 13 Jan 2022 19:13:13 +0000 (13:13 -0600)
committerCraig Small <csmall@dropbear.xyz>
Mon, 17 Jan 2022 09:26:17 +0000 (20:26 +1100)
In the commit referenced below, I fixed what I thought
was all the top 'truncation' warnings. For that commit
I had been using CFLAGS='-ggdb -Wall'. However, if one
uses just a vanilla './configure', then a hidden extra
warning will surface. This patch will finally kill it.

[ thanks a bunch gcc - we love this kind of behavior ]

Reference(s):
. 01/08/22, original warning fix
commit 44ca06f1a05b31880ca0ec4e59923a3255f5816d

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.h

index 07919afab9efa9ac75b2651dc2b9f5bd98223653..3e28afe430ebbb2b7aff59f12c4975c212fd0c46 100644 (file)
--- a/top/top.h
+++ b/top/top.h
@@ -357,7 +357,7 @@ typedef struct WIN_t {
           capclr_msg [CLRBUFSIZ],      //   RCW_t colors (& rebuilt too),
           capclr_pmt [CLRBUFSIZ],      //   but NO recurring costs !
           capclr_hdr [CLRBUFSIZ],      //   note: sum, msg and pmt strs
-          capclr_rowhigh [CLRBUFSIZ],  //         are only used when this
+          capclr_rowhigh [SMLBUFSIZ],  //         are only used when this
           capclr_rownorm [CLRBUFSIZ],  //         window is the 'Curwin'!
           cap_bold [CAPBUFSIZ],        // support for View_NOBOLD toggle
           grpname [GRPNAMSIZ],         // window number:name, printable