diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h index 0a051a7..a681a40 100644 --- a/FL/fl_utf8.h +++ b/FL/fl_utf8.h @@ -130,7 +130,7 @@ FL_EXPORT unsigned fl_utf8froma (char *dst, unsigned dstlen, const char *src, un /* FL_EXPORT int fl_latin12utf(const unsigned char *src, int srclen, char *dst); */ /* F2: Returns true if the current O/S locale is UTF8 */ -FL_EXPORT int fl_utf8locale(); +FL_EXPORT int fl_utf8locale(void); /* F2: Examine the first len characters of src, to determine if the input text is UTF8 or not * NOTE: The value returned is not simply boolean - it contains information about the probable diff --git a/fluid/code.cxx b/fluid/code.cxx index b5cbc44..c6624da 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -372,10 +372,11 @@ int write_code(const char *s, const char *t) { first_type = first_type->next; } - const char *hdr = "\ -// generated by Fast Light User Interface Designer (fluid) version %.4f\n\n"; - fprintf(header_file, hdr, FL_VERSION); - fprintf(code_file, hdr, FL_VERSION); +#define HDR \ +"// generated by Fast Light User Interface Designer (fluid) version %.4f\n\n" + fprintf(header_file, HDR, FL_VERSION); + fprintf(code_file, HDR, FL_VERSION); +#undef HDR {char define_name[102]; const char* a = fl_filename_name(t); diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index f6164a1..09910dc 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1710,13 +1710,13 @@ int main(int argc,char **argv) { int i = 1; if (!Fl::args(argc,argv,i,arg) || i < argc-1) { - static const char *msg = - "usage: %s name.fl\n" - " -c : write .cxx and .h and exit\n" - " -cs : write .cxx and .h and strings and exit\n" - " -o : .cxx output filename, or extension if starts with '.'\n" - " -h : .h output filename, or extension if starts with '.'\n"; - int len = strlen(msg) + strlen(argv[0]) + strlen(Fl::help); +#define MSG \ + "usage: %s name.fl\n" \ + " -c : write .cxx and .h and exit\n" \ + " -cs : write .cxx and .h and strings and exit\n" \ + " -o : .cxx output filename, or extension if starts with '.'\n" \ + " -h : .h output filename, or extension if starts with '.'\n" + int len = strlen(MSG) + strlen(argv[0]) + strlen(Fl::help); Fl_Plugin_Manager pm("commandline"); int i, n = pm.plugins(); for (i=0; ihelp()); } char *buf = (char*)malloc(len+1); - sprintf(buf, msg, argv[0]); + sprintf(buf, MSG, argv[0]); +#undef MSG for (i=0; ihelp()); diff --git a/src/numericsort.c b/src/numericsort.c index 1b5b527..0968069 100644 --- a/src/numericsort.c +++ b/src/numericsort.c @@ -39,10 +39,10 @@ # include # endif /* HAVE_NDIR_H */ # endif /* HAVE_DIRENT_H */ -#else /* For WIN32 variants */ -# include #endif /* !WIN32 || __CYGWIN__ */ +#include + /* * 'numericsort()' - Compare two directory entries, possibly with * a case-insensitive comparison... diff --git a/src/scandir.c b/src/scandir.c index 27d40dc..164502e 100644 --- a/src/scandir.c +++ b/src/scandir.c @@ -27,6 +27,9 @@ # endif /* HAVE_SCANDIR */ #endif +/* Avoid "ISO C forbids an empty translation unit" warning */ +typedef int dummy; + /* * End of "$Id: scandir.c 9858 2013-04-05 14:14:08Z manolo $". */