From 3d0f86145ce211eee623b661d558ef3405d75933 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 24 Jul 2017 07:21:25 +0200 Subject: vo_opengl: check format on some printf-like calls Fix 1 incorrect use. --- video/out/opengl/utils.h | 6 ++++-- video/out/opengl/video_shaders.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'video') diff --git a/video/out/opengl/utils.h b/video/out/opengl/utils.h index 1ae2f0f330..4327b74b8f 100644 --- a/video/out/opengl/utils.h +++ b/video/out/opengl/utils.h @@ -135,9 +135,11 @@ void gl_sc_destroy(struct gl_shader_cache *sc); bool gl_sc_error_state(struct gl_shader_cache *sc); void gl_sc_reset_error(struct gl_shader_cache *sc); void gl_sc_add(struct gl_shader_cache *sc, const char *text); -void gl_sc_addf(struct gl_shader_cache *sc, const char *textf, ...); +void gl_sc_addf(struct gl_shader_cache *sc, const char *textf, ...) + PRINTF_ATTRIBUTE(2, 3); void gl_sc_hadd(struct gl_shader_cache *sc, const char *text); -void gl_sc_haddf(struct gl_shader_cache *sc, const char *textf, ...); +void gl_sc_haddf(struct gl_shader_cache *sc, const char *textf, ...) + PRINTF_ATTRIBUTE(2, 3); void gl_sc_hadd_bstr(struct gl_shader_cache *sc, struct bstr text); void gl_sc_uniform_tex(struct gl_shader_cache *sc, char *name, GLenum target, GLuint texture); diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c index e83973b4b8..3381d532b6 100644 --- a/video/out/opengl/video_shaders.c +++ b/video/out/opengl/video_shaders.c @@ -454,7 +454,7 @@ void pass_ootf(struct gl_shader_cache *sc, enum mp_csp_light light, float peak) if (light == MP_CSP_LIGHT_DISPLAY) return; - GLSLF("// apply ootf\n", sc); + GLSLF("// apply ootf\n"); GLSLF("color.rgb *= vec3(%f);\n", peak); switch (light) -- cgit v1.2.3