From: Jim Warner Date: Thu, 13 Jan 2022 19:13:13 +0000 (-0600) Subject: top: banish one more warning for '-Wformat-truncation' X-Git-Tag: v4.0.0~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6c564361bf2261bb7e6e385489ac1243bc4a86a;p=procps-ng top: banish one more warning for '-Wformat-truncation' 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 --- diff --git a/top/top.h b/top/top.h index 07919afa..3e28afe4 100644 --- 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