Fix warnings when opengl is disabled

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-07-25 02:48:12 +01:00
parent 72cedea5a3
commit 79b135dccc
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
2 changed files with 22 additions and 5 deletions

View File

@ -25,9 +25,7 @@
#include "win.h"
#include "x.h"
enum root_flags {
ROOT_FLAGS_SCREEN_CHANGE = 1
};
enum root_flags { ROOT_FLAGS_SCREEN_CHANGE = 1 };
// == Functions ==
// TODO move static inline functions that are only used in compton.c, into
@ -100,9 +98,10 @@ static inline void free_wincondlst(c2_lptr_t **pcondlst) {
}
#ifndef CONFIG_OPENGL
static inline void free_paint_glx(session_t *ps, paint_t *p) {
static inline void free_paint_glx(session_t *ps attr_unused, paint_t *p attr_unused) {
}
static inline void free_win_res_glx(session_t *ps, struct managed_win *w) {
static inline void
free_win_res_glx(session_t *ps attr_unused, struct managed_win *w attr_unused) {
}
#endif

View File

@ -92,6 +92,15 @@ static inline bool paint_bind_tex(session_t *ps, paint_t *ppaint, int wid, int h
if (force || !glx_tex_binded(ppaint->ptex, ppaint->pixmap))
return glx_bind_pixmap(ps, &ppaint->ptex, ppaint->pixmap, wid, hei,
repeat, fbcfg);
#else
(void)ps;
(void)ppaint;
(void)wid;
(void)hei;
(void)repeat;
(void)depth;
(void)visual;
(void)force;
#endif
return true;
}
@ -203,6 +212,12 @@ void render(session_t *ps, int x, int y, int dx, int dy, int wid, int hei, doubl
#endif
default: assert(0);
}
#ifndef CONFIG_OPENGL
(void)neg;
(void)ptex;
(void)reg_paint;
(void)pprogram;
#endif
}
static inline void
@ -738,6 +753,9 @@ win_blur_background(session_t *ps, struct managed_win *w, xcb_render_picture_t t
#endif
default: assert(0);
}
#ifndef CONFIG_OPENGL
(void)reg_paint;
#endif
}
/// paint all windows