summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-01-21 13:38:26 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-01-21 13:38:26 +0100
commitc0f5080cb056919e898ac572e72fd62568dc307a (patch)
treea2069e3079bc16aae3ab9546547b8200705bbbfe
parent09eff7243a6e8e37d9615df7b951ffa3c03c0ae2 (diff)
Fix compiler warnings [-Wunused-variable]
... and missing return value [-Wreturn-type]
-rw-r--r--src/drivers/X11/Fl_X11_System_Driver.cxx2
-rw-r--r--test/coordinates.cxx16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/drivers/X11/Fl_X11_System_Driver.cxx b/src/drivers/X11/Fl_X11_System_Driver.cxx
index 2f3656a47..9ffae3d45 100644
--- a/src/drivers/X11/Fl_X11_System_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_System_Driver.cxx
@@ -113,6 +113,7 @@ int Fl_X11_System_Driver::clocale_snprintf(char *output, size_t output_size, con
int retval = vsnprintf(output, output_size, format, args);
setlocale(LC_NUMERIC, saved_locale);
#endif
+ return retval;
}
int Fl_X11_System_Driver::clocale_sscanf(const char *input, const char *format, va_list args) {
@@ -128,6 +129,7 @@ int Fl_X11_System_Driver::clocale_sscanf(const char *input, const char *format,
int retval = vsscanf(input, format, args);
setlocale(LC_NUMERIC, saved_locale);
#endif
+ return retval;
}
// Find a program in the path...
diff --git a/test/coordinates.cxx b/test/coordinates.cxx
index 472bae150..bb3651daf 100644
--- a/test/coordinates.cxx
+++ b/test/coordinates.cxx
@@ -48,33 +48,33 @@ public:
Fl_Window* tl_window = new Fl_Window(0, 0, 250, 100);
tl_window->box(FL_ENGRAVED_BOX);
- Title* tl_title = new Title(10, 10, 230, 40, FL_RED,
+ /* Title* tl_title = */ new Title(10, 10, 230, 40, FL_RED,
"Fl_Window TL(0, 0, 250, 100)\nx, y relative to main window");
- Box* tl_box = new Box(25, 50, 200, 40, FL_RED,
+ /* Box* tl_box = */ new Box(25, 50, 200, 40, FL_RED,
"Fl_Box tl(25, 50, 200, 40)\nx, y relative to TL window");
tl_window->end();
Fl_Window* br_window = new Fl_Window(250, 100, 250, 100);
br_window->box(FL_ENGRAVED_BOX);
- Title* br_title = new Title(10, 10, 230, 40, FL_MAGENTA,
+ /* Title* br_title = */ new Title(10, 10, 230, 40, FL_MAGENTA,
"Fl_Window BR(250, 100, 250, 100)\nx, y relative to main window");
- Box* br_box = new Box(25, 50, 200, 40, FL_MAGENTA,
+ /* Box* br_box = */ new Box(25, 50, 200, 40, FL_MAGENTA,
"Fl_Box br(25, 50, 200, 40)\nx, y relative to BR window");
br_window->end();
Fl_Group* tr_group = new Fl_Group(250, 0, 250, 100);
tr_group->box(FL_ENGRAVED_BOX);
- Title* tr_title = new Title(260, 10, 230, 40, FL_BLUE,
+ /* Title* tr_title = */ new Title(260, 10, 230, 40, FL_BLUE,
"Fl_Group TR(250, 0, 250, 100)\nx, y relative to main window");
- Box* tr_box = new Box(275, 50, 200, 40, FL_BLUE,
+ /* Box* tr_box = */ new Box(275, 50, 200, 40, FL_BLUE,
"Fl_Box tr(275, 50, 200, 40)\nx, y relative to main window");
tr_group->end();
Fl_Group* bl_group = new Fl_Group(0, 100, 250, 100);
bl_group->box(FL_ENGRAVED_BOX);
- Title* bl_title = new Title(10, 110, 230, 40, FL_BLACK,
+ /* Title* bl_title = */ new Title(10, 110, 230, 40, FL_BLACK,
"Fl_Group BL(0, 100, 250, 100)\nx, y relative to main window");
- Box* bl_box = new Box(25, 150, 200, 40, FL_BLACK,
+ /* Box* bl_box = */ new Box(25, 150, 200, 40, FL_BLACK,
"Fl_Box bl(25, 150, 200, 40)\nx, y relative to main window");
bl_group->end();