xdg_shell, xdg_shell_v6: Remove unreachable code 15/278115/1
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 13 Jul 2022 04:50:19 +0000 (13:50 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:09:05 +0000 (14:09 +0900)
Change-Id: I2ffdb8d385f5cfc07b272505e134f04b16bd7859

src/xdg_shell/xdg_surface.c
src/xdg_shell_v6/xdg_surface_v6.c

index 1e1654e..35ca7a7 100644 (file)
@@ -396,14 +396,14 @@ xdg_surface_handle_ack_configure(struct wl_client *client,
     }
 
     switch (surface->role) {
-        case DS_XDG_SURFACE_ROLE_NONE:
-            assert(0 && "not reached");
-            break;
         case DS_XDG_SURFACE_ROLE_TOPLEVEL:
             // TODO
             break;
         case DS_XDG_SURFACE_ROLE_POPUP:
             break;
+        default:
+            assert(0 && "not reached");
+            break;
     }
 
     surface->configured = true;
index 69ab595..487ad45 100644 (file)
@@ -402,14 +402,14 @@ xdg_surface_v6_handle_ack_configure(struct wl_client *client,
     }
 
     switch (surface->role) {
-        case DS_XDG_SURFACE_V6_ROLE_NONE:
-            assert(0 && "not reached");
-            break;
         case DS_XDG_SURFACE_V6_ROLE_TOPLEVEL:
             // TODO
             break;
         case DS_XDG_SURFACE_V6_ROLE_POPUP:
             break;
+        default:
+            assert(0 && "not reached");
+            break;
     }
 
     surface->configured = true;