summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-04 12:35:27 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-04 12:35:27 +0900
commit03aeb1d463ad799e91baf620a2dcac87c6ea8763 (patch)
tree522b6763c622a4a71223fa08abde71035908062a
parenta2afa0afd24bc404d154c5be43a824c655fae806 (diff)
fix fallthrough warnings
-rw-r--r--src/bin/e_comp.c2
-rw-r--r--src/bin/e_dnd.c4
-rw-r--r--src/bin/e_fm.c2
-rw-r--r--src/bin/e_fm/e_fm_main_udisks2.c3
-rw-r--r--src/bin/e_intl.c8
-rw-r--r--src/bin/e_main.c14
-rw-r--r--src/bin/e_randr2.c2
-rw-r--r--src/modules/cpufreq/e_mod_main.c6
-rw-r--r--src/modules/mixer/lib/backends/pulseaudio/pulse.c98
-rw-r--r--src/modules/sysinfo/cpuclock/cpuclock.c3
-rw-r--r--src/modules/xwayland/e_mod_main.c1
11 files changed, 90 insertions, 53 deletions
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index aed07e6c7..6113d125c 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -1624,7 +1624,9 @@ e_comp_e_object_layer_get(const E_Object *obj)
1624 case E_GADCON_CLIENT_TYPE: 1624 case E_GADCON_CLIENT_TYPE:
1625 gc = ((E_Gadcon_Client *)(void *)(obj))->gadcon; 1625 gc = ((E_Gadcon_Client *)(void *)(obj))->gadcon;
1626 EINA_SAFETY_ON_NULL_RETURN_VAL(gc, 0); 1626 EINA_SAFETY_ON_NULL_RETURN_VAL(gc, 0);
1627 EINA_FALLTHROUGH;
1627 /* no break */ 1628 /* no break */
1629
1628 case E_GADCON_TYPE: 1630 case E_GADCON_TYPE:
1629 if (!gc) gc = (E_Gadcon *)obj; 1631 if (!gc) gc = (E_Gadcon *)obj;
1630 if (gc->shelf) return gc->shelf->layer; 1632 if (gc->shelf) return gc->shelf->layer;
diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c
index 28b855563..5bea50fec 100644
--- a/src/bin/e_dnd.c
+++ b/src/bin/e_dnd.c
@@ -718,7 +718,9 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd)
718 case E_GADCON_CLIENT_TYPE: 718 case E_GADCON_CLIENT_TYPE:
719 gc = ((E_Gadcon_Client *)(void *)(h->obj))->gadcon; 719 gc = ((E_Gadcon_Client *)(void *)(h->obj))->gadcon;
720 if (!gc) return 0; 720 if (!gc) return 0;
721 EINA_FALLTHROUGH;
721 /* no break */ 722 /* no break */
723
722 case E_GADCON_TYPE: 724 case E_GADCON_TYPE:
723 if (!gc) gc = (E_Gadcon *)h->obj; 725 if (!gc) gc = (E_Gadcon *)h->obj;
724 726
@@ -821,7 +823,9 @@ _e_dnd_object_layer_get(E_Drop_Handler *h)
821 case E_GADCON_CLIENT_TYPE: 823 case E_GADCON_CLIENT_TYPE:
822 /* add 1 to ensure we're above a potential receiving gadcon */ 824 /* add 1 to ensure we're above a potential receiving gadcon */
823 adjust = 1; 825 adjust = 1;
826 EINA_FALLTHROUGH;
824 /* no break */ 827 /* no break */
828
825 default: 829 default:
826 adjust += e_comp_e_object_layer_get(obj); 830 adjust += e_comp_e_object_layer_get(obj);
827 } 831 }
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index d4b74d315..2047643b7 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -5945,6 +5945,8 @@ _e_fm2_typebuf_match(Evas_Object *obj, int next)
5945 x++; 5945 x++;
5946 break; 5946 break;
5947 } 5947 }
5948 EINA_FALLTHROUGH;
5949 /* no break */
5948 5950
5949 case 1: 5951 case 1:
5950 _e_fm2_icon_desel_any(obj); 5952 _e_fm2_icon_desel_any(obj);
diff --git a/src/bin/e_fm/e_fm_main_udisks2.c b/src/bin/e_fm/e_fm_main_udisks2.c
index e6585d2f4..da5e3b6c8 100644
--- a/src/bin/e_fm/e_fm_main_udisks2.c
+++ b/src/bin/e_fm/e_fm_main_udisks2.c
@@ -1000,6 +1000,9 @@ _e_fm_main_udisks2_volume_mounts_update(E_Volume *v, Eldbus_Message_Iter *arr3,
1000 if (m) mounts = eina_list_append(mounts, m); 1000 if (m) mounts = eina_list_append(mounts, m);
1001 } 1001 }
1002 while (eldbus_message_iter_next(fuckyouglib)); 1002 while (eldbus_message_iter_next(fuckyouglib));
1003 EINA_FALLTHROUGH;
1004 /* no break */
1005
1003 default: continue; 1006 default: continue;
1004 } 1007 }
1005 } 1008 }
diff --git a/src/bin/e_intl.c b/src/bin/e_intl.c
index a4f3de82d..82dc718e9 100644
--- a/src/bin/e_intl.c
+++ b/src/bin/e_intl.c
@@ -713,17 +713,25 @@ e_intl_locale_parts_get(const char *locale)
713 case 0: 713 case 0:
714 language[tmp_idx] = 0; 714 language[tmp_idx] = 0;
715 tmp_idx = 0; 715 tmp_idx = 0;
716 EINA_FALLTHROUGH;
717 /* no break */
716 718
717 case 1: 719 case 1:
718 territory[tmp_idx] = 0; 720 territory[tmp_idx] = 0;
719 tmp_idx = 0; 721 tmp_idx = 0;
722 EINA_FALLTHROUGH;
723 /* no break */
720 724
721 case 2: 725 case 2:
722 codeset[tmp_idx] = 0; 726 codeset[tmp_idx] = 0;
723 tmp_idx = 0; 727 tmp_idx = 0;
728 EINA_FALLTHROUGH;
729 /* no break */
724 730
725 case 3: 731 case 3:
726 modifier[tmp_idx] = 0; 732 modifier[tmp_idx] = 0;
733 EINA_FALLTHROUGH;
734 /* no break */
727 735
728 default: 736 default:
729 break; 737 break;
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 01d0f0e53..ed076f72b 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -1570,20 +1570,24 @@ _e_main_test_formats(void)
1570 evas_object_image_file_set(im, buff, key); 1570 evas_object_image_file_set(im, buff, key);
1571 switch (evas_object_image_load_error_get(im)) 1571 switch (evas_object_image_load_error_get(im))
1572 { 1572 {
1573 default:
1574 e_error_message_show(_("Enlightenment found Evas can't load '%s' files. "
1575 "Check Evas has '%s' loader support.\n"), t, t);
1576 if (i) _e_main_shutdown(-1);
1577 break;
1578 case EVAS_LOAD_ERROR_CORRUPT_FILE: 1573 case EVAS_LOAD_ERROR_CORRUPT_FILE:
1579 case EVAS_LOAD_ERROR_DOES_NOT_EXIST: 1574 case EVAS_LOAD_ERROR_DOES_NOT_EXIST:
1580 case EVAS_LOAD_ERROR_PERMISSION_DENIED: 1575 case EVAS_LOAD_ERROR_PERMISSION_DENIED:
1581 e_error_message_show(_("Enlightenment cannot access test image for '%s' filetype. " 1576 e_error_message_show(_("Enlightenment cannot access test image for '%s' filetype. "
1582 "Check your install for setup issues.\n"), t); 1577 "Check your install for setup issues.\n"), t);
1578 EINA_FALLTHROUGH;
1579 // fallthrough anyway as normally these files should work
1580
1583 case EVAS_LOAD_ERROR_NONE: 1581 case EVAS_LOAD_ERROR_NONE:
1584 snprintf(b, sizeof(b), ".%s", types[i]); 1582 snprintf(b, sizeof(b), ".%s", types[i]);
1585 efreet_icon_extension_add(b); 1583 efreet_icon_extension_add(b);
1586 break; 1584 break;
1585
1586 default:
1587 e_error_message_show(_("Enlightenment found Evas can't load '%s' files. "
1588 "Check Evas has '%s' loader support.\n"), t, t);
1589 if (i) _e_main_shutdown(-1);
1590 break;
1587 } 1591 }
1588 } 1592 }
1589 1593
diff --git a/src/bin/e_randr2.c b/src/bin/e_randr2.c
index 484f15f49..4a67ff4df 100644
--- a/src/bin/e_randr2.c
+++ b/src/bin/e_randr2.c
@@ -407,6 +407,8 @@ _config_update(E_Randr2 *r, E_Config_Randr2 *cfg, Eina_Bool update_only)
407 ecore_timer_loop_add(2, _config_ask_dialog, eina_strdup(s->info.name)); 407 ecore_timer_loop_add(2, _config_ask_dialog, eina_strdup(s->info.name));
408 else 408 else
409 ecore_timer_loop_add(0.01, _config_ask_dialog, eina_strdup(s->info.name)); 409 ecore_timer_loop_add(0.01, _config_ask_dialog, eina_strdup(s->info.name));
410 EINA_FALLTHROUGH;
411 /* no break */
410 case E_RANDR2_POLICY_NONE: 412 case E_RANDR2_POLICY_NONE:
411 cs->rel_mode = E_RANDR2_RELATIVE_NONE; 413 cs->rel_mode = E_RANDR2_RELATIVE_NONE;
412 break; 414 break;
diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index 65e168db6..409e217c1 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -1153,11 +1153,17 @@ _cpufreq_event_cb_powersave(void *data EINA_UNUSED, int type, void *event)
1153 _cpufreq_set_governor("conservative"); 1153 _cpufreq_set_governor("conservative");
1154 break; 1154 break;
1155 } 1155 }
1156 EINA_FALLTHROUGH;
1157 /* no break */
1156 1158
1157 case E_POWERSAVE_MODE_EXTREME: 1159 case E_POWERSAVE_MODE_EXTREME:
1160 case E_POWERSAVE_MODE_FREEZE:
1158 if (has_powersave) 1161 if (has_powersave)
1159 _cpufreq_set_governor("powersave"); 1162 _cpufreq_set_governor("powersave");
1160 break; 1163 break;
1164
1165 default:
1166 break;
1161 } 1167 }
1162 1168
1163 return ECORE_CALLBACK_PASS_ON; 1169 return ECORE_CALLBACK_PASS_ON;
diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
index ec1bdc1b4..88c3b553c 100644
--- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c
+++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
@@ -716,66 +716,68 @@ _pulse_pa_state_cb(pa_context *context, void *data)
716 break; 716 break;
717 717
718 case PA_CONTEXT_READY: 718 case PA_CONTEXT_READY:
719 { 719 ctx->connect = NULL;
720 ctx->connect = NULL; 720 ctx->connected = EINA_TRUE;
721 ctx->connected = EINA_TRUE; 721 pa_context_set_subscribe_callback(context, _subscribe_cb, ctx);
722 pa_context_set_subscribe_callback(context, _subscribe_cb, ctx); 722 if (!(o = pa_context_subscribe(context, (pa_subscription_mask_t)
723 if (!(o = pa_context_subscribe(context, (pa_subscription_mask_t) 723 (PA_SUBSCRIPTION_MASK_SINK|
724 (PA_SUBSCRIPTION_MASK_SINK| 724 PA_SUBSCRIPTION_MASK_SOURCE|
725 PA_SUBSCRIPTION_MASK_SOURCE| 725 PA_SUBSCRIPTION_MASK_SINK_INPUT|
726 PA_SUBSCRIPTION_MASK_SINK_INPUT| 726 PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT|
727 PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT| 727 PA_SUBSCRIPTION_MASK_CLIENT|
728 PA_SUBSCRIPTION_MASK_CLIENT| 728 PA_SUBSCRIPTION_MASK_SERVER|
729 PA_SUBSCRIPTION_MASK_SERVER| 729 PA_SUBSCRIPTION_MASK_CARD),
730 PA_SUBSCRIPTION_MASK_CARD), 730 NULL, NULL)))
731 NULL, NULL))) 731 {
732 { 732 ERR("pa_context_subscribe() failed");
733 ERR("pa_context_subscribe() failed"); 733 return;
734 return; 734 }
735 } 735 pa_operation_unref(o);
736 pa_operation_unref(o);
737
738 if (!(o = pa_context_get_sink_info_list(context, _sink_cb, ctx)))
739 {
740 ERR("pa_context_get_sink_info_list() failed");
741 return;
742 }
743 pa_operation_unref(o);
744 736
745 if (!(o = pa_context_get_sink_input_info_list(context, 737 if (!(o = pa_context_get_sink_info_list(context, _sink_cb, ctx)))
746 _sink_input_cb, 738 {
747 ctx))) 739 ERR("pa_context_get_sink_info_list() failed");
748 { 740 return;
749 ERR("pa_context_get_sink_input_info_list() failed"); 741 }
750 return; 742 pa_operation_unref(o);
751 }
752 pa_operation_unref(o);
753 743
754 if (!(o = pa_context_get_source_info_list(context, _source_cb, 744 if (!(o = pa_context_get_sink_input_info_list(context,
745 _sink_input_cb,
755 ctx))) 746 ctx)))
756 { 747 {
757 ERR("pa_context_get_source_info_list() failed"); 748 ERR("pa_context_get_sink_input_info_list() failed");
758 return; 749 return;
759 } 750 }
760 pa_operation_unref(o); 751 pa_operation_unref(o);
761 752
762 if (!(o = pa_context_get_server_info(context, _server_info_cb, 753 if (!(o = pa_context_get_source_info_list(context, _source_cb,
763 ctx))) 754 ctx)))
764 { 755 {
765 ERR("pa_context_get_server_info() failed"); 756 ERR("pa_context_get_source_info_list() failed");
766 return; 757 return;
767 } 758 }
768 pa_operation_unref(o); 759 pa_operation_unref(o);
769 break; 760
770 } 761 if (!(o = pa_context_get_server_info(context, _server_info_cb,
762 ctx)))
763 {
764 ERR("pa_context_get_server_info() failed");
765 return;
766 }
767 pa_operation_unref(o);
768 break;
771 769
772 case PA_CONTEXT_FAILED: 770 case PA_CONTEXT_FAILED:
773 WRN("PA_CONTEXT_FAILED"); 771 WRN("PA_CONTEXT_FAILED");
774 if (!ctx->connect) 772 if (!ctx->connect)
775 ctx->connect = ecore_timer_loop_add(1, _pulse_connect, data); 773 ctx->connect = ecore_timer_loop_add(1, _pulse_connect, data);
776 goto err; 774 goto err;
775
777 case PA_CONTEXT_TERMINATED: 776 case PA_CONTEXT_TERMINATED:
778 ERR("PA_CONTEXT_TERMINATE:"); 777 ERR("PA_CONTEXT_TERMINATE:");
778 EINA_FALLTHROUGH;
779 /* no break */
780
779 default: 781 default:
780 if (ctx->connect) 782 if (ctx->connect)
781 { 783 {
diff --git a/src/modules/sysinfo/cpuclock/cpuclock.c b/src/modules/sysinfo/cpuclock/cpuclock.c
index 159cbcd7c..d446ca255 100644
--- a/src/modules/sysinfo/cpuclock/cpuclock.c
+++ b/src/modules/sysinfo/cpuclock/cpuclock.c
@@ -240,6 +240,9 @@ _cpuclock_event_cb_powersave(void *data, int type, void *event)
240 _cpuclock_set_governor("conservative"); 240 _cpuclock_set_governor("conservative");
241 break; 241 break;
242 } 242 }
243 EINA_FALLTHROUGH;
244 /* no break */
245
243 case E_POWERSAVE_MODE_EXTREME: 246 case E_POWERSAVE_MODE_EXTREME:
244 default: 247 default:
245 if (has_powersave) 248 if (has_powersave)
diff --git a/src/modules/xwayland/e_mod_main.c b/src/modules/xwayland/e_mod_main.c
index b7d01a16f..2f4f0b1f8 100644
--- a/src/modules/xwayland/e_mod_main.c
+++ b/src/modules/xwayland/e_mod_main.c
@@ -330,6 +330,7 @@ setup_lock(void)
330 case EEXIST: 330 case EEXIST:
331 exs->disp++; 331 exs->disp++;
332 EINA_FALLTHROUGH; 332 EINA_FALLTHROUGH;
333 /* no break */
333 case EAGAIN: 334 case EAGAIN:
334 continue; 335 continue;
335 case 0: 336 case 0: