[libgnome-volume-control/wip/muktupavels/warnings: 1/3] mixer-control: fix -Wswitch-enum warnings



commit 59160951d824d092917c3a71dfdb374117a58fc2
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Dec 25 19:14:19 2019 +0200

    mixer-control: fix -Wswitch-enum warnings
    
    Warnings introduced in ec5cf3e0de6715803e64b65abb059e2155b3d6de:
    gvc-mixer-control.c:1457:9: warning: enumeration value ‘PA_SINK_INIT’ not handled in switch 
[-Wswitch-enum]
    gvc-mixer-control.c:1457:9: warning: enumeration value ‘PA_SINK_UNLINKED’ not handled in switch 
[-Wswitch-enum]
    
    Warning building with alsa:
    gvc-mixer-control.c:2218:9: warning: enumeration value ‘GVC_HEADSET_PORT_CHOICE_NONE’ not handled in 
switch [-Wswitch-enum]

 gvc-mixer-control.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c
index 21fc233..04644d7 100644
--- a/gvc-mixer-control.c
+++ b/gvc-mixer-control.c
@@ -1461,7 +1461,9 @@ translate_pa_state (pa_sink_state_t state) {
                 return GVC_STREAM_STATE_IDLE;
         case PA_SINK_SUSPENDED:
                 return GVC_STREAM_STATE_SUSPENDED;
+        case PA_SINK_INIT:
         case PA_SINK_INVALID_STATE:
+        case PA_SINK_UNLINKED:
         default:
                 return GVC_STREAM_STATE_INVALID;
         }
@@ -2228,6 +2230,7 @@ gvc_mixer_control_set_headset_port (GvcMixerControl      *control,
                 gvc_mixer_control_set_port_status_for_headset (control, id, "analog-output-speaker", TRUE);
                 gvc_mixer_control_set_port_status_for_headset (control, id, "analog-input-headphone-mic", 
FALSE);
                 break;
+        case GVC_HEADSET_PORT_CHOICE_NONE:
         default:
                 g_assert_not_reached ();
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]