[PATCH 2/3] Fix GCC warnings due to functions not being declared as static and random() being declared as extern

Arnaud Fontaine arnau at debian.org
Sun Dec 19 07:14:16 PST 2010


---
 image/test_bitmap.c    |   12 ++++++------
 image/test_formats.c   |    1 -
 image/test_xcb_image.c |    2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/image/test_bitmap.c b/image/test_bitmap.c
index c999b22..5bf7955 100644
--- a/image/test_bitmap.c
+++ b/image/test_bitmap.c
@@ -69,12 +69,12 @@ static xcb_window_t make_window(xcb_connection_t *c,
     return w;
 }
 
-void process_events(xcb_connection_t *c,
-		    xcb_gcontext_t g,
-		    xcb_window_t w,
-		    xcb_pixmap_t p,
-		    uint32_t width,
-		    uint32_t height) {
+static void process_events(xcb_connection_t *c,
+			   xcb_gcontext_t g,
+			   xcb_window_t w,
+			   xcb_pixmap_t p,
+			   uint32_t width,
+			   uint32_t height) {
     xcb_generic_event_t *e;
     xcb_void_cookie_t cookie;
 
diff --git a/image/test_formats.c b/image/test_formats.c
index 4becc6c..5078548 100644
--- a/image/test_formats.c
+++ b/image/test_formats.c
@@ -43,7 +43,6 @@ color (uint32_t depth, uint32_t x, uint32_t y)
 	uint32_t p;
 
 	if (depth == 1) {
-		extern long random();
 		int frac = random() % (WIDTH * HEIGHT);
 		p = x * y >= frac;
 		return p;
diff --git a/image/test_xcb_image.c b/image/test_xcb_image.c
index 30b61ff..af890ca 100644
--- a/image/test_xcb_image.c
+++ b/image/test_xcb_image.c
@@ -39,7 +39,7 @@
 #define W_W 64
 #define W_H 64
 
-void
+static void
 reflect_window (xcb_connection_t *c,
 		xcb_drawable_t win,
 		xcb_drawable_t new_win,
-- 
1.7.2.3


--=-=-=--


More information about the Xcb mailing list