From b9a89c92ea38f784e0f02ab143c3cc07e797e0ef Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 28 Jul 2023 17:42:18 +0200 Subject: Fl_Shortcut_Button: Silence compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part 1: [-Wreorder] 'shortcut_value’ will be initialized after ... Part 2: [-Wunused] unused variable 'Y' --- src/Fl_Shortcut_Button.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Fl_Shortcut_Button.cxx') diff --git a/src/Fl_Shortcut_Button.cxx b/src/Fl_Shortcut_Button.cxx index f6d38c6b0..f7d1d5b25 100644 --- a/src/Fl_Shortcut_Button.cxx +++ b/src/Fl_Shortcut_Button.cxx @@ -49,8 +49,8 @@ Fl_Shortcut_Button::Fl_Shortcut_Button(int X,int Y,int W,int H, const char* l) default_set_(false), handle_default_button_(false), pre_esc_(0), - shortcut_value(0), - default_shortcut_(0) + default_shortcut_(0), + shortcut_value(0) { box(FL_DOWN_BOX); selection_color(FL_SELECTION_COLOR); @@ -159,7 +159,6 @@ int Fl_Shortcut_Button::handle(int e) { bool inside_default_button = false; if (default_set_ && ( (e == FL_PUSH) || (e == FL_DRAG) || (e == FL_RELEASE) ) ) { int X = x() + Fl::box_dx(box()); - int Y = y() + Fl::box_dy(box()); int W = w() - Fl::box_dw(box()); int H = h() - Fl::box_dh(box()); if (Fl::event_inside(this) && (Fl::event_x() > X+W-H)) -- cgit v1.2.3