[vlc-commits] Visual: add an assert in an impossible switch case

Jean-Baptiste Kempf git at videolan.org
Mon Feb 10 14:00:38 CET 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Feb 10 13:57:19 2014 +0100| [130a8081fc561e3bb44076a2130e228120c01c38] | committer: Jean-Baptiste Kempf

Visual: add an assert in an impossible switch case

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=130a8081fc561e3bb44076a2130e228120c01c38
---

 modules/visualization/visual/window.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/visualization/visual/window.c b/modules/visualization/visual/window.c
index f30ffc8..e08794d 100644
--- a/modules/visualization/visual/window.c
+++ b/modules/visualization/visual/window.c
@@ -29,6 +29,8 @@
 #include "window.h"
 #include "window_presets.h"
 
+#include <assert.h>
+
 /* Flat top window coefficients */
 #define FT_A0 1.000f
 #define FT_A1 1.930f
@@ -182,6 +184,7 @@ bool window_init( int i_buffer_size, window_param * p_param,
     }
     default:
         /* We should not reach here */
+        assert(0);
         break;
     }
 



More information about the vlc-commits mailing list