summaryrefslogtreecommitdiff
path: root/planemask.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-03 16:08:14 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-03 16:08:14 -0700
commitf3424f4c7c7e1aba33d0a117ea90dd5412530f45 (patch)
tree41864e0763a3d702eafa259fb8f771ddd8b0c016 /planemask.c
parentc3e109f0bb814f2a0e3385bdada58a52473397ac (diff)
Fix -Wformat-truncation warning
planemask.c: In function ‘create_planemask_choice’: planemask.c:109:43: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 3 [-Wformat-truncation=] snprintf(name, sizeof name, "planemask%d",i); ^~ planemask.c:109:33: note: directive argument in the range [0, 2147483647] snprintf(name, sizeof name, "planemask%d",i); ^~~~~~~~~~~~~ planemask.c:109:5: note: ‘snprintf’ output between 11 and 20 bytes into a destination of size 12 snprintf(name, sizeof name, "planemask%d",i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'planemask.c')
-rw-r--r--planemask.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/planemask.c b/planemask.c
index 535d6d5..7548e26 100644
--- a/planemask.c
+++ b/planemask.c
@@ -67,7 +67,7 @@ create_planemask_choice(Widget w)
int i, num_planes;
char buf[40];
- char name[12];
+ char name[20];
num_planes = PlanesOfScreen(X.scr);