[PATCH] Function declares a pointer return, so return one.

Bryce Harrington bryce at canonical.com
Fri Nov 19 12:14:39 PST 2010


These two functions are just wrappers around display_create_*_surface
but weren't forwarding along the result of those calls as is implied by
their return value type.

This fixes a compile-time warning.

Signed-off-by: Bryce Harrington <bryce at canonical.com>
---
 clients/window.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/clients/window.c b/clients/window.c
index 9dfd355..66d7aad 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -454,9 +454,9 @@ display_create_surface(struct display *display,
 		       struct rectangle *rectangle)
 {
 #ifdef HAVE_CAIRO_GL
-	display_create_drm_surface(display, rectangle);
+	return display_create_drm_surface(display, rectangle);
 #else
-	display_create_shm_surface(display, rectangle);
+	return display_create_shm_surface(display, rectangle);
 #endif
 }
 
@@ -466,9 +466,9 @@ display_create_surface_from_file(struct display *display,
 				 struct rectangle *rectangle)
 {
 #ifdef HAVE_CAIRO_GL
-	display_create_drm_surface_from_file(display, filename, rectangle);
+	return display_create_drm_surface_from_file(display, filename, rectangle);
 #else
-	display_create_shm_surface_from_file(display, filename, rectangle);
+	return display_create_shm_surface_from_file(display, filename, rectangle);
 #endif
 }
 
-- 
1.7.1



More information about the wayland-devel mailing list