[PATCH 1/2] tunnel-sink-new: remove switch-default from state change callbacks

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

 



Using default sections for switch(state) in state change callbacks will prevent
useful compiler warnings for non-handled cases
---
 src/modules/module-tunnel-sink-new.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/modules/module-tunnel-sink-new.c b/src/modules/module-tunnel-sink-new.c
index cd7c39c..e0dbe91 100644
--- a/src/modules/module-tunnel-sink-new.c
+++ b/src/modules/module-tunnel-sink-new.c
@@ -245,7 +245,8 @@ static void stream_state_cb(pa_stream *stream, void *userdata) {
                 sink_update_requested_latency_cb(u->sink);
             else
                 stream_changed_buffer_attr_cb(stream, userdata);
-        default:
+        case PA_STREAM_CREATING:
+        case PA_STREAM_UNCONNECTED:
             break;
     }
 }
@@ -333,8 +334,6 @@ static void context_state_cb(pa_context *c, void *userdata) {
             u->connected = false;
             u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP);
             break;
-        default:
-            break;
     }
 }
 
-- 
1.8.4




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux