commit: 90f39641e974b5e69bd25a7b1f952dee8f7bb883
parent: 524f64c0cebb07ac47c56c4af29f1d68ebc0c6f7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Wed, 3 Jul 2019 06:11:12 +0200
Clear most compiler warnings
Diffstat:
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/inaban.c b/inaban.c
@@ -56,6 +56,7 @@ focus_view(struct inaban_view *view, struct wlr_surface *surface)
static void
keyboard_handle_modifiers(struct wl_listener *listener, void *data)
{
+ (void)data;
/* This event is raised when a modifier key, such as shift or alt, is
* pressed. We simply communicate this to the client. */
struct inaban_keyboard *keyboard = wl_container_of(listener, keyboard, modifiers);
@@ -235,8 +236,6 @@ view_at(struct inaban_view *view,
double view_sx = lx - view->x;
double view_sy = ly - view->y;
- struct wlr_surface_state *state = &view->xdg_surface->surface->current;
-
double _sx, _sy;
struct wlr_surface *_surface = NULL;
_surface = wlr_xdg_surface_surface_at(view->xdg_surface, view_sx, view_sy, &_sx, &_sy);
@@ -373,6 +372,7 @@ server_cursor_axis(struct wl_listener *listener, void *data)
static void
server_cursor_frame(struct wl_listener *listener, void *data)
{
+ (void)data;
/* This event is forwarded by the cursor when a pointer emits an frame
* event. Frame events are sent after regular pointer events to group
* multiple events together. For instance, two axis events may happen at the
@@ -442,6 +442,7 @@ render_surface(struct wlr_surface *surface, int sx, int sy, void *data)
static void
output_frame(struct wl_listener *listener, void *data)
{
+ (void)data;
/* This function is called every time an output is ready to display a frame,
* generally at the output's refresh rate (e.g. 60Hz). */
struct inaban_output *output = wl_container_of(listener, output, frame);
@@ -458,7 +459,7 @@ output_frame(struct wl_listener *listener, void *data)
/* Begin the renderer (calls glViewport and some other GL sanity checks) */
wlr_renderer_begin(renderer, width, height);
- float color[4] = {0.3, 0.3, 0.3, 1.0};
+ float color[4] = {0.3f, 0.3f, 0.3f, 1.0f};
wlr_renderer_clear(renderer, color);
/* Each subsequent window we render is rendered on top of the last. Because
@@ -535,6 +536,7 @@ server_new_output(struct wl_listener *listener, void *data)
static void
xdg_surface_map(struct wl_listener *listener, void *data)
{
+ (void)data;
/* Called when the surface is mapped, or ready to display on-screen. */
struct inaban_view *view = wl_container_of(listener, view, map);
view->mapped = true;
@@ -544,6 +546,7 @@ xdg_surface_map(struct wl_listener *listener, void *data)
static void
xdg_surface_unmap(struct wl_listener *listener, void *data)
{
+ (void)data;
/* Called when the surface is unmapped, and should no longer be shown. */
struct inaban_view *view = wl_container_of(listener, view, unmap);
view->mapped = false;
@@ -552,6 +555,7 @@ xdg_surface_unmap(struct wl_listener *listener, void *data)
static void
xdg_surface_destroy(struct wl_listener *listener, void *data)
{
+ (void)data;
/* Called when the surface is destroyed and should never be shown again. */
struct inaban_view *view = wl_container_of(listener, view, destroy);
wl_list_remove(&view->link);
@@ -561,7 +565,8 @@ xdg_surface_destroy(struct wl_listener *listener, void *data)
static void
xdg_deny_request(struct wl_listener *listener, void *data)
{
- return;
+ (void)listener;
+ (void)data;
}
static void