Remove compiler warnings '-Wextra-semi' (see also PR #266)

I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows
(cross-compiled on Linux) and removed all "extra semicolon" warnings
I could find. I didn't check on macOS (yet).

Note: Linux configured with and w/o Pango but not w/o Xft. Compilation
with other options (e.g. Cairo) might still emit such warnings.
This commit is contained in:
Albrecht Schlosser
2021-08-27 14:52:43 +02:00
parent 23c54e7a4b
commit 6ac305a508
17 changed files with 61 additions and 61 deletions
+3 -3
View File
@@ -73,19 +73,19 @@ protected:
/** Constructor that sets the graphics driver to use for the created surface. */
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }
/** Sets the graphics driver of this drawing surface. */
inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;};
inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;}
public:
virtual void set_current(void);
virtual bool is_current();
/** \brief Returns the graphics driver of this drawing surface. */
inline Fl_Graphics_Driver *driver() {return pGraphicsDriver; };
inline Fl_Graphics_Driver *driver() {return pGraphicsDriver; }
/** The current drawing surface.
In other words, the Fl_Surface_Device object that currently receives all graphics requests.
\note It's possible to transiently remove the GUI scaling factor in place in the current
drawing surface with \ref fl_override_scale(). */
static inline Fl_Surface_Device *surface() {
return surface_ ? surface_ : default_surface();
};
}
/** \brief The destructor. */
virtual ~Fl_Surface_Device();
static void push_current(Fl_Surface_Device *new_current);
+7 -7
View File
@@ -55,9 +55,9 @@ public:
~Fl_File_Browser();
/** Sets or gets the size of the icons. The default size is 20 pixels. */
uchar iconsize() const { return (iconsize_); };
uchar iconsize() const { return (iconsize_); }
/** Sets or gets the size of the icons. The default size is 20 pixels. */
void iconsize(uchar s) { iconsize_ = s; redraw(); };
void iconsize(uchar s) { iconsize_ = s; redraw(); }
/**
Sets or gets the filename filter. The pattern matching uses
@@ -70,10 +70,10 @@ public:
the fl_filename_match()
function in FLTK.
*/
const char *filter() const { return (pattern_); };
const char *filter() const { return (pattern_); }
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); };
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); }
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }
/**
Sets or gets the file browser type, FILES or
@@ -81,14 +81,14 @@ public:
files and directories are shown. Otherwise only directories are
shown.
*/
int filetype() const { return (filetype_); };
int filetype() const { return (filetype_); }
/**
Sets or gets the file browser type, FILES or
DIRECTORIES. When set to FILES, both
files and directories are shown. Otherwise only directories are
shown.
*/
void filetype(int t) { filetype_ = t; };
void filetype(int t) { filetype_ = t; }
void errmsg(const char *emsg);
/**
Returns OS error messages, or NULL if none. Use when advised.
+1 -1
View File
@@ -142,7 +142,7 @@ public:
void ok_label(const char *l);
const char * ok_label();
void preview(int e);
int preview() const { return previewButton->value(); };
int preview() const { return previewButton->value(); }
private:
void showHidden(int e);
void remove_hidden_files();
+2 -2
View File
@@ -36,7 +36,7 @@
class FL_EXPORT Fl_Paged_Device : public Fl_Widget_Surface {
protected:
/** \brief The constructor */
Fl_Paged_Device() : Fl_Widget_Surface(NULL) {};
Fl_Paged_Device() : Fl_Widget_Surface(NULL) {}
public:
/**
Possible page formats.
@@ -99,7 +99,7 @@ public:
*/
static const page_format page_formats[NO_PAGE_FORMATS];
/** \brief The destructor */
virtual ~Fl_Paged_Device() {};
virtual ~Fl_Paged_Device() {}
virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL);
/** Synonym of begin_job(int pagecount, int *frompage, int *topage, char **perr_message).
For API compatibility with FLTK 1.3.x */
+1 -1
View File
@@ -162,7 +162,7 @@ public:
virtual void color_average(Fl_Color c, float i);
virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0);
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
virtual Fl_SVG_Image *as_svg_image() { return this; };
virtual Fl_SVG_Image *as_svg_image() { return this; }
virtual void normalize();
};