gallium/auxiliary/vl: Fix a couple of warnings
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 18 Apr 2019 18:33:10 +0000 (11:33 -0700)
committerKristian H. Kristensen <hoegsberg@gmail.com>
Fri, 19 Apr 2019 16:17:37 +0000 (16:17 +0000)
Remove unused functions and mark unhandled default case with
unreachable.

Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
src/gallium/auxiliary/vl/vl_mpeg12_decoder.c

index 0e99d830df3a328e7636285e7190496a3f4350de..58ea15c4d2fa1a65c49910b64498186b4875af1b 100644 (file)
@@ -617,12 +617,6 @@ DIV2DOWN(int todiv)
    return (todiv&~1)/2;
 }
 
-static inline int
-DIV2UP(int todiv)
-{
-   return (todiv+1)/2;
-}
-
 static inline void
 motion_vector(struct vl_mpg12_bs *bs, int r, int s, int dmv, short delta[2], short dmvector[2])
 {
index 9589b1e89e065aaca900ce7748b0fd0e29cea19c..6e6f0bd4563b760f055f70c5498ea80f64bda1dc 100644 (file)
@@ -388,8 +388,8 @@ MotionVectorToPipe(const struct pipe_mpeg12_macroblock *mb, unsigned vector,
          mv.bottom.weight = weight;
          break;
 
-      default: // TODO: Support DUALPRIME and 16x8
-         break;
+      default:
+         unreachable("TODO: Support DUALPRIME and 16x8");
       }
    } else {
       mv.top.x = mv.top.y = 0;