summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-21 14:14:53 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-01-21 14:14:53 -0800
commit834a388e533abb3f7e926bff7d37fa480f2eda70 (patch)
treebfb8b68d3d4dfd3cdd17f2d9fc3146ba2c371226
parentaef5af610ef4847140f957b1c62f9178e06965f1 (diff)
Fix 4 of 4 -Wformat-truncation warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--msg.c2
-rw-r--r--screen.c2
-rw-r--r--util.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/msg.c b/msg.c
index 110d99d..9f801bb 100644
--- a/msg.c
+++ b/msg.c
@@ -351,7 +351,7 @@ static int SetScrn(
if (scrn == NULL) {
if (msg == NULL || msg->num_scrns == 0) return 0;
if (!force && XawAsciiSourceChanged(msg->source)) {
- char str[100];
+ char str[150];
snprintf(str, sizeof(str),
"Are you sure you want to remove changes to %s?",
MsgName(msg));
diff --git a/screen.c b/screen.c
index daed288..67fd7e3 100644
--- a/screen.c
+++ b/screen.c
@@ -240,7 +240,7 @@ static void MakeTocAndView(Scrn scrn)
/* the optional miscellaneous command buttons */
if (app_resources.command_button_count > 0) {
- char name[12];
+ char name[18];
if (app_resources.command_button_count > 500)
app_resources.command_button_count = 500;
for (i=1; i <= app_resources.command_button_count; i++) {
diff --git a/util.c b/util.c
index 0068dab..2ee8106 100644
--- a/util.c
+++ b/util.c
@@ -242,7 +242,7 @@ void RenameAndCheck(const char *from, const char *to)
char *CreateGeometry(int gbits, int x, int y, int width, int height)
{
- char *result, str1[10], str2[10], str3[10], str4[10];
+ char *result, str1[12], str2[12], str3[12], str4[12];
if (gbits & WidthValue)
snprintf(str1, sizeof(str1), "=%d", width);
else