summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2019-08-29 17:58:24 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2019-08-29 17:58:24 +0200
commit50ee013a0138956381da9d681757c31560a10e0f (patch)
tree15b24e6864f347235618bdc94d7618cff81c5af7 /test
parent6e683783f41e3d8fd8494e7c9d234f4e8b5876da (diff)
Fix more compiler warnings (STR 3529)
test/colbrowser.cxx: [-Wformat-overflow=] test/file_chooser.cxx: [-Wformat-overflow=] Increase buffer size.
Diffstat (limited to 'test')
-rw-r--r--test/colbrowser.cxx4
-rw-r--r--test/file_chooser.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/test/colbrowser.cxx b/test/colbrowser.cxx
index 318f73546..ccec8d60c 100644
--- a/test/colbrowser.cxx
+++ b/test/colbrowser.cxx
@@ -3,7 +3,7 @@
//
// X Color Browser demo program for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2019 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -146,7 +146,7 @@ static int load_browser(char *fname)
FILE *fp;
RGBdb *db = rgbdb, *dbs = db + MAX_RGB;
int r, g, b, lr = -1 , lg = -1, lb = -1;
- char name[256], buf[256];
+ char name[256], buf[300];
if (!(fp = fl_fopen(fname, "r"))) {
fl_alert("%s\n%s\n%s","Load", fname, "Can't open");
diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx
index 6a5b42bcc..3c72cdd70 100644
--- a/test/file_chooser.cxx
+++ b/test/file_chooser.cxx
@@ -4,7 +4,7 @@
// File chooser test program.
//
// Copyright 1999-2010 by Michael Sweet.
-// Copyright 2011-2017 by Bill Spitzak and others.
+// Copyright 2011-2019 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -286,7 +286,7 @@ pdf_check(const char *name, // I - Name of file
{
const char *home; // Home directory
char preview[FL_PATH_MAX], // Preview filename
- command[FL_PATH_MAX]; // Command
+ command[3 * FL_PATH_MAX]; // Command
if (memcmp(header, "%PDF", 4) != 0)
@@ -318,7 +318,7 @@ ps_check(const char *name, // I - Name of file
const char *home; // Home directory
char preview[FL_PATH_MAX], // Preview filename
outname[FL_PATH_MAX], // Preview PS file
- command[FL_PATH_MAX]; // Command
+ command[3 * FL_PATH_MAX]; // Command
FILE *in, // Input file
*out; // Output file
int page; // Current page