diff options
-rw-r--r-- | clients/dnd.c | 3 | ||||
-rw-r--r-- | clients/gears.c | 3 | ||||
-rw-r--r-- | clients/image.c | 7 | ||||
-rw-r--r-- | clients/simple-client.c | 2 | ||||
-rw-r--r-- | clients/terminal.c | 7 | ||||
-rw-r--r-- | clients/view.c | 7 | ||||
-rw-r--r-- | clients/window.c | 4 |
7 files changed, 9 insertions, 24 deletions
diff --git a/clients/dnd.c b/clients/dnd.c index 42233af..1625ffd 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -678,7 +678,6 @@ int main(int argc, char *argv[]) { struct display *d; - struct dnd *dnd; d = display_create(&argc, &argv, option_entries); if (d == NULL) { @@ -688,7 +687,7 @@ main(int argc, char *argv[]) display_set_global_handler(d, global_handler); - dnd = dnd_create (d); + dnd_create(d); display_run(d); diff --git a/clients/gears.c b/clients/gears.c index 25e1fcb..5ae2a95 100644 --- a/clients/gears.c +++ b/clients/gears.c @@ -421,14 +421,13 @@ gears_create(struct display *display) int main(int argc, char *argv[]) { struct display *d; - struct gears *gears; d = display_create(&argc, &argv, NULL); if (d == NULL) { fprintf(stderr, "failed to create display: %m\n"); return -1; } - gears = gears_create(d); + gears_create(d); display_run(d); return 0; diff --git a/clients/image.c b/clients/image.c index b528ed6..3eada1e 100644 --- a/clients/image.c +++ b/clients/image.c @@ -250,11 +250,8 @@ main(int argc, char *argv[]) return -1; } - for (i = 1; i < argc; i++) { - struct image *image; - - image = image_create (d, i, argv[i]); - } + for (i = 1; i < argc; i++) + image_create (d, i, argv[i]); display_run(d); diff --git a/clients/simple-client.c b/clients/simple-client.c index 3a9b4a1..2524c8e 100644 --- a/clients/simple-client.c +++ b/clients/simple-client.c @@ -153,7 +153,6 @@ create_shader(struct window *window, const char *source, GLenum shader_type) static void init_gl(struct window *window) { - GLfloat ar; GLuint frag, vert; GLint status; @@ -163,7 +162,6 @@ init_gl(struct window *window) glGenRenderbuffers(1, &window->gl.color_rbo); glViewport(0, 0, window->geometry.width, window->geometry.height); - ar = (GLfloat)window->geometry.width / (GLfloat)window->geometry.height; frag = create_shader(window, frag_shader_text, GL_FRAGMENT_SHADER); vert = create_shader(window, vert_shader_text, GL_VERTEX_SHADER); diff --git a/clients/terminal.c b/clients/terminal.c index cb4d861..dfddb7f 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -666,7 +666,7 @@ static void terminal_shift_line(struct terminal *terminal, int d) { union utf8_char *row; - struct attr *attr_row, attr; + struct attr *attr_row; row = terminal_get_row(terminal, terminal->row); attr_row = terminal_get_attr_row(terminal, terminal->row); @@ -681,7 +681,6 @@ terminal_shift_line(struct terminal *terminal, int d) memmove(&row[terminal->column], &row[terminal->column + d], (terminal->width - terminal->column - d) * sizeof(union utf8_char)); - attr = attr_row[terminal->width - 1]; memmove(&attr_row[terminal->column], &attr_row[terminal->column + d], (terminal->width - terminal->column - d) * sizeof(struct attr)); memset(&row[terminal->width - d], 0, d * sizeof(union utf8_char)); @@ -704,7 +703,7 @@ terminal_resize(struct terminal *terminal, int width, int height) struct attr *data_attr; char *tab_ruler; int data_pitch, attr_pitch; - int i, l, total_rows, start; + int i, l, total_rows; struct rectangle allocation; struct winsize ws; int32_t pixel_width, pixel_height; @@ -744,10 +743,8 @@ terminal_resize(struct terminal *terminal, int width, int height) if (terminal->height > height) { total_rows = height; - start = terminal->height - height; } else { total_rows = terminal->height; - start = 0; } for (i = 0; i < total_rows; i++) { diff --git a/clients/view.c b/clients/view.c index 9512dc4..88c59ad 100644 --- a/clients/view.c +++ b/clients/view.c @@ -209,11 +209,8 @@ main(int argc, char *argv[]) return -1; } - for (i = 1; i < argc; i++) { - struct view *view; - - view = view_create (d, i, argv[i]); - } + for (i = 1; i < argc; i++) + view_create (d, i, argv[i]); display_run(d); diff --git a/clients/window.c b/clients/window.c index 0278d08..7567cce 100644 --- a/clients/window.c +++ b/clients/window.c @@ -865,15 +865,13 @@ window_handle_motion(void *data, struct wl_input_device *input_device, { struct input *input = data; struct window *window = input->pointer_focus; - int location, pointer = POINTER_LEFT_PTR; + int pointer = POINTER_LEFT_PTR; input->x = x; input->y = y; input->sx = sx; input->sy = sy; - location = get_pointer_location(window, input->sx, input->sy); - if (window->motion_handler) pointer = (*window->motion_handler)(window, input, time, x, y, sx, sy, |