Fix compiler warnings (backported from 1.4)

This commit is contained in:
Albrecht Schlosser
2021-11-05 18:27:06 +01:00
parent e02032bd05
commit a394e7aff0
6 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ void template_delete_cb(Fl_Button *, void *) {
void template_load() {
int i;
char name[1024], filename[1024], path[1024], *ptr;
char name[1024], filename[1400], path[1024], *ptr;
struct dirent **files;
int num_files;
+1 -1
View File
@@ -209,7 +209,7 @@ template_browser->do_callback();} {}
Function {template_load()} {return_type void
} {
code {int i;
char name[1024], filename[1024], path[1024], *ptr;
char name[1024], filename[1400], path[1024], *ptr;
struct dirent **files;
int num_files;
+5 -5
View File
@@ -700,7 +700,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());
@@ -899,7 +899,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);
@@ -1057,8 +1057,8 @@ Fl_File_Chooser::filter(const char *p) // I - Pattern(s)
void
Fl_File_Chooser::newdir()
{
const char *dir; // New directory name
char pathname[FL_PATH_MAX]; // Full path of directory
const char *dir; // New directory name
char pathname[FL_PATH_MAX + 4]; // Full path of directory
// Get a directory name from the user
@@ -1479,7 +1479,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();
+2 -2
View File
@@ -596,7 +596,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[] = {
@@ -841,7 +841,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;
+3 -3
View File
@@ -2781,7 +2781,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...
@@ -2878,7 +2878,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
@@ -3297,7 +3297,7 @@ Fl_Help_View::load(const char *f)// I - Filename to load (may also have target)
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);
+2 -2
View File
@@ -251,7 +251,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)
@@ -283,7 +283,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