Skip to content

Commit

Permalink
Adding FALLTHROUGH label to a buch of case fallthroughs in order to m…
Browse files Browse the repository at this point in the history
…ake lint happy. STR #2285

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7162 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Feb 26, 2010
1 parent 2668a87 commit 86d292b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/Fl_Button.cxx
Expand Up @@ -84,7 +84,7 @@ void Fl_Button::draw() {
int Fl_Button::handle(int event) {
int newval;
switch (event) {
case FL_ENTER:
case FL_ENTER: /* FALLTHROUGH */
case FL_LEAVE:
// if ((value_?selection_color():color())==FL_GRAY) redraw();
return 1;
Expand Down Expand Up @@ -143,7 +143,7 @@ int Fl_Button::handle(int event) {
do_callback();
} else if (when() & FL_WHEN_RELEASE) do_callback();
return 1;
case FL_FOCUS :
case FL_FOCUS : /* FALLTHROUGH */
case FL_UNFOCUS :
if (Fl::visible_focus()) {
if (box() == FL_NO_BOX) {
Expand Down
6 changes: 3 additions & 3 deletions src/Fl_Color_Chooser.cxx
Expand Up @@ -123,7 +123,7 @@ void Fl_Color_Chooser::set_valuators() {
gvalue.range(0,1); gvalue.step(1,1000); gvalue.value(g_);
bvalue.range(0,1); bvalue.step(1,1000); bvalue.value(b_);
break;
case M_BYTE:
case M_BYTE: /* FALLTHROUGH */
case M_HEX:
rvalue.range(0,255); rvalue.step(1); rvalue.value(int(255*r_+.5));
gvalue.range(0,255); gvalue.step(1); gvalue.value(int(255*g_+.5));
Expand Down Expand Up @@ -233,7 +233,7 @@ int Flcc_HueBox::handle(int e) {
if (Fl::event_state(FL_CTRL)) H = ih;
if (c->hsv(H, S, c->value())) c->do_callback();
} return 1;
case FL_FOCUS :
case FL_FOCUS : /* FALLTHROUGH */
case FL_UNFOCUS :
if (Fl::visible_focus()) {
redraw();
Expand Down Expand Up @@ -354,7 +354,7 @@ int Flcc_ValueBox::handle(int e) {
if (fabs(Yf-iv)<(3*1.0/h())) Yf = iv;
if (c->hsv(c->hue(),c->saturation(),Yf)) c->do_callback();
} return 1;
case FL_FOCUS :
case FL_FOCUS : /* FALLTHROUGH */
case FL_UNFOCUS :
if (Fl::visible_focus()) {
redraw();
Expand Down
4 changes: 2 additions & 2 deletions src/Fl_Counter.cxx
Expand Up @@ -165,13 +165,13 @@ int Fl_Counter::handle(int event) {
return 0;
}
// break not required because of switch...
case FL_FOCUS :
case FL_FOCUS : /* FALLTHROUGH */
case FL_UNFOCUS :
if (Fl::visible_focus()) {
redraw();
return 1;
} else return 0;
case FL_ENTER :
case FL_ENTER : /* FALLTHROUGH */
case FL_LEAVE :
return 1;
default:
Expand Down
2 changes: 1 addition & 1 deletion src/Fl_Dial.cxx
Expand Up @@ -134,7 +134,7 @@ int Fl_Dial::handle(int event, int X, int Y, int W, int H) {
case FL_RELEASE:
handle_release();
return 1;
case FL_ENTER :
case FL_ENTER : /* FALLTHROUGH */
case FL_LEAVE :
return 1;
default:
Expand Down
4 changes: 2 additions & 2 deletions src/Fl_Group.cxx
Expand Up @@ -102,7 +102,7 @@ static int send(Fl_Widget* o, int event) {
if (o->type() < FL_WINDOW) return o->handle(event);
switch ( event )
{
case FL_DND_ENTER:
case FL_DND_ENTER: /* FALLTHROUGH */
case FL_DND_DRAG:
// figure out correct type of event:
event = (o->contains(Fl::belowmouse())) ? FL_DND_DRAG : FL_DND_ENTER;
Expand All @@ -114,7 +114,7 @@ static int send(Fl_Widget* o, int event) {
Fl::e_x = save_x;
switch ( event )
{
case FL_ENTER:
case FL_ENTER: /* FALLTHROUGH */
case FL_DND_ENTER:
// Successful completion of FL_ENTER means the widget is now the
// belowmouse widget, but only call Fl::belowmouse if the child
Expand Down
4 changes: 2 additions & 2 deletions src/Fl_Menu_Button.cxx
Expand Up @@ -73,7 +73,7 @@ const Fl_Menu_Item* Fl_Menu_Button::popup() {
int Fl_Menu_Button::handle(int e) {
if (!menu() || !menu()->text) return 0;
switch (e) {
case FL_ENTER:
case FL_ENTER: /* FALLTHROUGH */
case FL_LEAVE:
return (box() && !type()) ? 1 : 0;
case FL_PUSH:
Expand All @@ -95,7 +95,7 @@ int Fl_Menu_Button::handle(int e) {
case FL_SHORTCUT:
if (Fl_Widget::test_shortcut()) {popup(); return 1;}
return test_shortcut() != 0;
case FL_FOCUS:
case FL_FOCUS: /* FALLTHROUGH */
case FL_UNFOCUS:
if (box() && Fl::visible_focus()) {
redraw();
Expand Down
1 change: 1 addition & 0 deletions src/Fl_Tabs.cxx
Expand Up @@ -151,6 +151,7 @@ int Fl_Tabs::handle(int event) {
} else {
if (Fl::event_y() < y()+h()+H) return Fl_Group::handle(event);
}}
/* FALLTHROUGH */
case FL_DRAG:
case FL_RELEASE:
o = which(Fl::event_x(), Fl::event_y());
Expand Down
1 change: 1 addition & 0 deletions src/filename_match.cxx
Expand Up @@ -114,6 +114,7 @@ int fl_filename_match(const char *s, const char *p) {

case '\\': // quote next character
if (*p) p++;
/* FALLTHROUGH */
default:
if (tolower(*s) != tolower(*(p-1))) return 0;
s++;
Expand Down

0 comments on commit 86d292b

Please sign in to comment.