[libepc] Add missing default switch cases.



commit df35f45c760bad4aff2afdee57065b10af0586e9
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Oct 28 11:47:55 2015 +0100

    Add missing default switch cases.
    
    To silence compiler warnings.

 libepc/protocol.c  |    8 ++++++++
 libepc/publisher.c |    4 ++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libepc/protocol.c b/libepc/protocol.c
index e620895..02f2ff8 100644
--- a/libepc/protocol.c
+++ b/libepc/protocol.c
@@ -131,6 +131,10 @@ epc_protocol_get_service_type (EpcProtocol protocol)
 
       case EPC_PROTOCOL_UNKNOWN:
         return NULL;
+
+      default:
+        g_warning ("%s: Unexpected protocol.", G_STRFUNC);
+        break;
     }
 
   g_return_val_if_reached (NULL);
@@ -159,6 +163,10 @@ epc_protocol_get_uri_scheme (EpcProtocol  protocol)
 
       case EPC_PROTOCOL_UNKNOWN:
         return NULL;
+
+      default:
+        g_warning ("%s: Unexpected protocol.", G_STRFUNC);
+        break;
     }
 
   g_return_val_if_reached (NULL);
diff --git a/libepc/publisher.c b/libepc/publisher.c
index 61aa93b..be573a1 100644
--- a/libepc/publisher.c
+++ b/libepc/publisher.c
@@ -2685,6 +2685,10 @@ epc_publisher_expand_name (const gchar  *name,
           case '%':
             subst = "%";
             break;
+
+          default:
+            g_warning ("%s: Unexpected character.", G_STRFUNC);
+            break;
         }
 
       if (subst)


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