Re: [PATCH 5/5] Weston: fix drmModeRmFB

2012-03-31 Thread Pekka Paalanen
On Sat, 31 Mar 2012 16:00:59 +0200 Andreas Ericsson wrote: > On 03/31/2012 12:58 PM, Martin Minarik wrote: > > fb_id is unsigned integer, we are assigning -1 to it. Changed > > to 0x should be better. > > > > 0x is within the range for the maximum usable filedescriptor > on Linux, and n

Re: [PATCH 5/5] Weston: fix drmModeRmFB

2012-03-31 Thread Andreas Ericsson
On 03/31/2012 12:58 PM, Martin Minarik wrote: > fb_id is unsigned integer, we are assigning -1 to it. Changed to 0x > should be better. > 0x is within the range for the maximum usable filedescriptor on Linux, and not even very uncommon a setting, at that. Use ~0 instead, or change fb_id t

Re: [PATCH 3/5] Weston: use unsigned int, iterators

2012-03-31 Thread Andreas Ericsson
Why does this matter? I'm assuming it's because they're matched agains unsigned ints in the loops, but it would be good to say so in the commit message so people aren't left guessing. Useless changes are confusing for people who need to do actual changes to the same code later, so keep them to a m

[PATCH 5/5] Weston: fix drmModeRmFB

2012-03-31 Thread Martin Minarik
fb_id is unsigned integer, we are assigning -1 to it. Changed to 0x should be better. diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 4305cd5..f43f652 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1041,8 +1041,9 @@ create_output_for_connector(struct drm_comp

[PATCH 4/5] Weston: handle file errors

2012-03-31 Thread Martin Minarik
diff --git a/shared/image-loader.c b/shared/image-loader.c index 98cc431..a0881b5 100644 --- a/shared/image-loader.c +++ b/shared/image-loader.c @@ -157,7 +157,7 @@ read_func(png_structp png, png_bytep data, png_size_t size) { FILE *fp = png_get_io_ptr(png); - if (fread(data, 1, siz

[PATCH 3/5] Weston: use unsigned int, iterators

2012-03-31 Thread Martin Minarik
diff --git a/clients/dnd.c b/clients/dnd.c index 66ba2ce..a99fbec 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -167,7 +167,7 @@ dnd_redraw_handler(struct widget *widget, void *data) struct rectangle allocation; cairo_t *cr; cairo_surface_t *surface; - int i; +

[PATCH 2/5] Weston compositor: const order

2012-03-31 Thread Martin Minarik
diff --git a/src/compositor.c b/src/compositor.c index 3b2ebd4..65de05f 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1273,7 +1273,7 @@ surface_set_input_region(struct wl_client *client, weston_compositor_schedule_repaint(surface->compositor); } -const static struct wl_surface_

[PATCH 1/5] Weston: Enable more warnings

2012-03-31 Thread Martin Minarik
diff --git a/configure.ac b/configure.ac index f60b208..d794f72 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,7 @@ AC_ARG_ENABLE(tests, AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests = xyes) if test "x$GCC" = "xyes"; then - GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-