summaryrefslogtreecommitdiff
path: root/cube-tex.c
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2017-03-15 18:56:53 -0300
committerEric Engestrom <eric@engestrom.ch>2017-03-18 16:12:35 +0000
commit1b22f28ddf23a77c82ff80f73252e0cb3176e68c (patch)
tree296bc6add773ef82e40ea16005f80a9b4d46b18a /cube-tex.c
parente877fcb06a0a52f377f4d3305e26603558c0a565 (diff)
downloadkmscube-1b22f28ddf23a77c82ff80f73252e0cb3176e68c.tar.gz
cube-tex: Handle SMOOTH switch case
In kmscube.c there is the following logic: if (mode == SMOOTH) { egl = init_cube_smooth(gbm); } else { egl = init_cube_tex(gbm, mode); } ,which makes init_cube_tex() to be never called on the SMOOTH case. Handle the SMOOTH switch case inside init_tex() to fix the following build warning: cube-tex.c: In function 'init_tex': cube-tex.c:438:2: warning: enumeration value 'SMOOTH' not handled in switch [-Wswitch] switch (mode) { ^ Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> [Eric: add assert()] Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Diffstat (limited to 'cube-tex.c')
-rw-r--r--cube-tex.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cube-tex.c b/cube-tex.c
index a543e83..0caeaea 100644
--- a/cube-tex.c
+++ b/cube-tex.c
@@ -442,6 +442,9 @@ static int init_tex(enum mode mode)
return init_tex_nv12_2img();
case NV12_1IMG:
return init_tex_nv12_1img();
+ case SMOOTH:
+ assert(!"unreachable");
+ return -1;
}
return -1;
}