[gnome-bluetooth/wip/hadess/add-bt-type: 2/2] lib: Quiet compile time warning




commit de1bca74da537250c73849dc1d0314fb1949b78b
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Nov 2 10:45:13 2021 +0100

    lib: Quiet compile time warning
    
    gnome-bluetooth/lib/bluetooth-utils.c: In function ‘bluetooth_type_to_string’:
    gnome-bluetooth/lib/bluetooth-utils.c:57:9: warning: enumeration value ‘BLUETOOTH_TYPE_ANY’ not handled 
in switch [-Wswitch]
       57 |         switch (type) {
          |         ^~~~~~

 lib/bluetooth-utils.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/lib/bluetooth-utils.c b/lib/bluetooth-utils.c
index 150c111c..b2f21886 100644
--- a/lib/bluetooth-utils.c
+++ b/lib/bluetooth-utils.c
@@ -96,6 +96,8 @@ bluetooth_type_to_string (BluetoothType type)
                return _("Toy");
        case BLUETOOTH_TYPE_SPEAKERS:
                return _("Speakers");
+       default:
+               /* fallthrough */
        }
 
        return _("Unknown");


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