Fix new gcc 4.6 warnings

simple-client.c:156:10: warning: variable ‘ar’ set but not used [-Wunused-but-set-variable]

etc.
dev
Kristian Høgsberg 14 years ago
parent 8335568d07
commit 00439617f3
  1. 3
      clients/dnd.c
  2. 3
      clients/gears.c
  3. 7
      clients/image.c
  4. 2
      clients/simple-client.c
  5. 7
      clients/terminal.c
  6. 7
      clients/view.c
  7. 4
      clients/window.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);

@ -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;

@ -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);

@ -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);

@ -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++) {

@ -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);

@ -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,

Loading…
Cancel
Save