r300g: remove default case statements in get_param
authorMarek Olšák <maraeo@gmail.com>
Tue, 22 Nov 2011 19:44:14 +0000 (20:44 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 22 Nov 2011 19:56:51 +0000 (20:56 +0100)
This will throw a compile warning if there's an unhandled CAP.

src/gallium/drivers/r300/r300_screen.c

index 24d15c4f1c6e605273d89d9e30a30e41eaf34d0c..426e4d1ab1729a3a4f735a3fc32d8643836686d8 100644 (file)
@@ -148,12 +148,8 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
         /* Render targets. */
         case PIPE_CAP_MAX_RENDER_TARGETS:
             return 4;
-
-        default:
-            debug_printf("r300: Warning: Unknown CAP %d in get_param.\n",
-                         param);
-            return 0;
     }
+    return 0;
 }
 
 static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, enum pipe_shader_cap param)
@@ -162,8 +158,7 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e
    boolean is_r400 = r300screen->caps.is_r400;
    boolean is_r500 = r300screen->caps.is_r500;
 
-   switch (shader)
-    {
+   switch (shader) {
     case PIPE_SHADER_FRAGMENT:
         switch (param)
         {
@@ -251,7 +246,6 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e
         case PIPE_SHADER_CAP_SUBROUTINES:
         case PIPE_SHADER_CAP_INTEGERS:
             return 0;
-        default:;
         }
         break;
     }