simple-client.c:156:10: warning: variable ‘ar’ set but not used [-Wunused-but-set-variable]
etc.
main(int argc, char *argv[])
{
struct display *d;
- struct dnd *dnd;
d = display_create(&argc, &argv, option_entries);
if (d == NULL) {
display_set_global_handler(d, global_handler);
- dnd = dnd_create (d);
+ dnd_create(d);
display_run(d);
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;
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);
static void
init_gl(struct window *window)
{
- GLfloat ar;
GLuint frag, vert;
GLint status;
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);
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);
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));
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;
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++) {
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);
{
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,