summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-12-01 15:25:07 +0100
committerMatthias Melcher <github@matthiasm.com>2023-12-01 15:25:17 +0100
commitccc21d381a41620a9fb91870ab2a47ef9309d148 (patch)
treedf0153790e2b95dabe7c5c24598a04316085cea7 /fluid
parent1077d749585dbb0778b8155f35c7c1fa2d0ee601 (diff)
Fixes a few minor compiler warnings.
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fd_Snap_Action.h1
-rw-r--r--fluid/Fl_Widget_Type.cxx6
-rw-r--r--fluid/Fl_Window_Type.cxx2
-rw-r--r--fluid/align_widget.cxx2
4 files changed, 7 insertions, 4 deletions
diff --git a/fluid/Fd_Snap_Action.h b/fluid/Fd_Snap_Action.h
index f0ca98be4..413e340f2 100644
--- a/fluid/Fd_Snap_Action.h
+++ b/fluid/Fd_Snap_Action.h
@@ -176,6 +176,7 @@ protected:
public:
int ex, ey, dx, dy, type, mask;
Fd_Snap_Action() : ex(0x7fff), ey(0x7fff), dx(128), dy(128), type(0), mask(0) { }
+ virtual ~Fd_Snap_Action() { }
virtual void check(Fd_Snap_Data &d) = 0;
virtual void draw(Fd_Snap_Data &d) { }
virtual bool matches(Fd_Snap_Data &d);
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index c2edfec8a..05260136c 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -255,7 +255,7 @@ void Fl_Widget_Type::redraw() {
Fl_Type *sort(Fl_Type *parent) {
Fl_Type *f,*n=0;
for (f = parent ? parent->next : Fl_Type::first; ; f = n) {
- if (!f || (parent && f->level <= parent->level)) return f;
+ if (!f || (parent && f->level <= parent->level)) break;
n = sort(f);
if (!f->selected || !f->is_true_widget()) continue;
Fl_Widget* fw = ((Fl_Widget_Type*)f)->o;
@@ -268,7 +268,9 @@ Fl_Type *sort(Fl_Type *parent) {
}
if (g != f) f->move_before(g);
}
- parent->layout_widget();
+ if (parent)
+ parent->layout_widget();
+ return f;
}
////////////////////////////////////////////////////////////////
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index 71ea0d9b6..db9ec34ba 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/Fl_Window_Type.cxx
@@ -322,7 +322,7 @@ uchar *Fl_Window_Type::read_image(int &ww, int &hh) {
}
void Fl_Window_Type::ideal_size(int &w, int &h) {
- w = 480, h = 320;
+ w = 480; h = 320;
if (main_window) {
int sx, sy, sw, sh;
Fl_Window *win = main_window;
diff --git a/fluid/align_widget.cxx b/fluid/align_widget.cxx
index 56cbd7c87..a1018e2ca 100644
--- a/fluid/align_widget.cxx
+++ b/fluid/align_widget.cxx
@@ -208,7 +208,7 @@ void align_widget_cb(Fl_Widget*, long how)
break;
//---- space evenly
case 20: // space evenly across
- left = max; right = min; wdt = 0, n = 0;
+ left = max; right = min; wdt = 0; n = 0;
for (o = Fl_Type::first; o; o = o->next)
if (o->selected && o->is_widget())
{