Browse Source

Fix remaining compiler warnings of (STR 3529)

src/Fl_File_Chooser2.cxx
src/Fl_File_Icon2.cxx
src/Fl_Help_View.cxx

The only known warnings are now in src/Fl_x.cxx as mentioned in
comment #1.
pull/36/head
Albrecht Schlosser 6 years ago
parent
commit
cb387bd6ff
  1. 8
      src/Fl_File_Chooser2.cxx
  2. 6
      src/Fl_File_Icon2.cxx
  3. 8
      src/Fl_Help_View.cxx

8
src/Fl_File_Chooser2.cxx

@ -624,7 +624,7 @@ void @@ -624,7 +624,7 @@ void
Fl_File_Chooser::fileListCB()
{
char *filename, // New filename
pathname[FL_PATH_MAX]; // Full pathname to file
pathname[FL_PATH_MAX + 4]; // Full pathname to file
filename = (char *)fileList->text(fileList->value());
@ -809,7 +809,7 @@ Fl_File_Chooser::fileNameCB() @@ -809,7 +809,7 @@ Fl_File_Chooser::fileNameCB()
directory(pathname);
if (filename[0]) {
char tempname[FL_PATH_MAX];
char tempname[FL_PATH_MAX + 4];
snprintf(tempname, sizeof(tempname), "%s/%s", directory_, filename);
fileName->value(tempname);
@ -968,7 +968,7 @@ void @@ -968,7 +968,7 @@ void
Fl_File_Chooser::newdir()
{
const char *dir; // New directory name
char pathname[FL_PATH_MAX]; // Full path of directory
char pathname[FL_PATH_MAX + 4]; // Full path of directory
// Get a directory name from the user
@ -1380,7 +1380,7 @@ Fl_File_Chooser::value(int f) // I - File number @@ -1380,7 +1380,7 @@ Fl_File_Chooser::value(int f) // I - File number
int i; // Looping var
int fcount; // Number of selected files
const char *name; // Current filename
static char pathname[FL_PATH_MAX]; // Filename + directory
static char pathname[FL_PATH_MAX + 4]; // Filename + directory
name = fileName->value();

6
src/Fl_File_Icon2.cxx

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// KDE icon code donated by Maarten De Boer.
//
// 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
@ -574,7 +574,7 @@ void @@ -574,7 +574,7 @@ void
Fl_File_Icon::load_system_icons(void) {
int i; // Looping var
Fl_File_Icon *icon; // New icons
char filename[FL_PATH_MAX]; // Filename
char filename[FL_PATH_MAX + 60]; // Filename
char icondir[FL_PATH_MAX]; // Icon directory
static int init = 0; // Have the icons been initialized?
const char * const icondirs[] = {
@ -819,7 +819,7 @@ load_kde_mimelnk(const char *filename, // I - mimelnk filename @@ -819,7 +819,7 @@ load_kde_mimelnk(const char *filename, // I - mimelnk filename
char pattern[1024];
char mimetype[1024];
char *val;
char full_iconfilename[FL_PATH_MAX];
char full_iconfilename[2 * FL_PATH_MAX];
Fl_File_Icon *icon;

8
src/Fl_Help_View.cxx

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
// Image support by Matthias Melcher, Copyright 2000-2009.
//
// Buffer management (HV_Edit_Buffer) and more by AlbrechtS and others.
// Copyright 2011-2018 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
@ -2775,7 +2775,7 @@ Fl_Shared_Image * @@ -2775,7 +2775,7 @@ Fl_Shared_Image *
Fl_Help_View::get_image(const char *name, int W, int H) {
const char *localname; // Local filename
char dir[FL_PATH_MAX]; // Current directory
char temp[FL_PATH_MAX], // Temporary filename
char temp[2 * FL_PATH_MAX], // Temporary filename
*tempptr; // Pointer into temporary name
Fl_Shared_Image *ip; // Image pointer...
@ -2872,7 +2872,7 @@ void Fl_Help_View::follow_link(Fl_Help_Link *linkp) @@ -2872,7 +2872,7 @@ void Fl_Help_View::follow_link(Fl_Help_Link *linkp)
if (strcmp(linkp->filename, filename_) != 0 && linkp->filename[0])
{
char dir[FL_PATH_MAX]; // Current directory
char temp[FL_PATH_MAX], // Temporary filename
char temp[2 * FL_PATH_MAX], // Temporary filename
*tempptr; // Pointer into temporary filename
@ -3305,7 +3305,7 @@ int Fl_Help_View::load(const char *f) @@ -3305,7 +3305,7 @@ int Fl_Help_View::load(const char *f)
char *target; // Target in file
char *slash; // Directory separator
const char *localname; // Local filename
char error[1024]; // Error buffer
char error[2 * FL_PATH_MAX]; // Error buffer
char newname[FL_PATH_MAX]; // New filename buffer
// printf("load(%s)\n",f); fflush(stdout);

Loading…
Cancel
Save