osdep: add MP_FALLTHROUGH

This commit is contained in:
Kacper Michajłow authored and Dudemanguy committed 2023-02-02 14:23:02 +00:00
1 parent 08cd7c1e29
commit 0a4b139ddf
4 files changed
+5 -3

No files matched your search

+2
View File
@@ -6,9 +6,11 @@
#ifdef __GNUC__
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format(printf, a1, a2)))
#define MP_NORETURN __attribute__((noreturn))
#define MP_FALLTHROUGH __attribute__((fallthrough))
#else
#define PRINTF_ATTRIBUTE(a1, a2)
#define MP_NORETURN
#define MP_FALLTHROUGH do {} while (0)
#endif
// Broken crap with __USE_MINGW_ANSI_STDIO
+1 -1
View File
@@ -699,7 +699,7 @@ static void add_uniforms(struct gl_shader_cache *sc, bstr *dst)
case RA_VARTYPE_INT:
case RA_VARTYPE_FLOAT:
assert(sc->ra->caps & RA_CAP_GLOBAL_UNIFORM);
// fall through
MP_FALLTHROUGH;
case RA_VARTYPE_TEX:
// Vulkan requires explicitly assigning the bindings in the shader
// source. For OpenGL it's optional, but requires higher GL version
+1 -1
View File
@@ -261,7 +261,7 @@ bool ra_gl_ctx_submit_frame(struct ra_swapchain *sw, const struct vo_frame *fram
case FLUSH_AUTO:
if (frame->display_synced)
break;
// fall through
MP_FALLTHROUGH;
case FLUSH_YES:
gl->Flush();
}
+1 -1
View File
@@ -1859,7 +1859,7 @@ static void update_render_options(struct vo *vo)
#else
MP_ERR(p, "Error diffusion dithering is not implemented.\n");
#endif
// fall through
MP_FALLTHROUGH;
case DITHER_ORDERED:
case DITHER_FRUIT:
p->params.dither_params = &p->dither;