Mesa (master): gallium/auxiliary/vl: Fix a couple of warnings

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 19 16:29:19 UTC 2019


Module: Mesa
Branch: master
Commit: bcb81b4d48f3a248189a6da0af564ae23473e451
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcb81b4d48f3a248189a6da0af564ae23473e451

Author: Kristian H. Kristensen <hoegsberg at google.com>
Date:   Thu Apr 18 11:33:10 2019 -0700

gallium/auxiliary/vl: Fix a couple of warnings

Remove unused functions and mark unhandled default case with
unreachable.

Signed-off-by: Kristian H. Kristensen <hoegsberg at google.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c | 6 ------
 src/gallium/auxiliary/vl/vl_mpeg12_decoder.c   | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
index 0e99d830df3..58ea15c4d2f 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
@@ -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])
 {
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
index 9589b1e89e0..6e6f0bd4563 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@@ -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;




More information about the mesa-commit mailing list