From 3161e92818366aedc106329675a7dd9ac2bffd10 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Thu, 27 May 2010 12:18:29 +0100 Subject: [PATCH] analysis: Make all function declarations be protoypes It's valid C to declare a function omitting it prototype, but it seems to be a good practise to always declare a function with its corresponding prototype. --- clutter/clutter-bezier.c | 2 +- clutter/cogl/cogl/cogl-context.c | 4 ++-- tests/interactive/test-cogl-primitives.c | 14 +++++++------- tests/interactive/test-project.c | 4 ++-- tests/micro-bench/test-text-perf.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clutter/clutter-bezier.c b/clutter/clutter-bezier.c index d21ca3e..3c2f827 100644 --- a/clutter/clutter-bezier.c +++ b/clutter/clutter-bezier.c @@ -96,7 +96,7 @@ struct _ClutterBezier }; ClutterBezier * -_clutter_bezier_new () +_clutter_bezier_new (void) { return g_slice_new0 (ClutterBezier); } diff --git a/clutter/cogl/cogl/cogl-context.c b/clutter/cogl/cogl/cogl-context.c index 871f6dd..8d678f4 100644 --- a/clutter/cogl/cogl/cogl-context.c +++ b/clutter/cogl/cogl/cogl-context.c @@ -167,7 +167,7 @@ cogl_create_context (void) } void -_cogl_destroy_context () +_cogl_destroy_context (void) { if (_context == NULL) @@ -217,7 +217,7 @@ _cogl_destroy_context () } CoglContext * -_cogl_context_get_default () +_cogl_context_get_default (void) { /* Create if doesn't exist yet */ if (_context == NULL) diff --git a/tests/interactive/test-cogl-primitives.c b/tests/interactive/test-cogl-primitives.c index fb5adb3..207c8e3 100644 --- a/tests/interactive/test-cogl-primitives.c +++ b/tests/interactive/test-cogl-primitives.c @@ -8,25 +8,25 @@ typedef void (*PaintFunc) (void); static void -test_paint_line () +test_paint_line (void) { cogl_path_line (-50, -25, 50, 25); } static void -test_paint_rect () +test_paint_rect (void) { cogl_path_rectangle (-50, -25, 50, 25); } static void -test_paint_rndrect() +test_paint_rndrect(void) { cogl_path_round_rectangle (-50, -25, 50, 25, 10, 5); } static void -test_paint_polyl () +test_paint_polyl (void) { gfloat poly_coords[] = { -50, -50, @@ -39,7 +39,7 @@ test_paint_polyl () } static void -test_paint_polyg () +test_paint_polyg (void) { gfloat poly_coords[] = { -50, -50, @@ -52,13 +52,13 @@ test_paint_polyg () } static void -test_paint_elp () +test_paint_elp (void) { cogl_path_ellipse (0, 0, 60, 40); } static void -test_paint_curve () +test_paint_curve (void) { cogl_path_move_to (-50, +50); diff --git a/tests/interactive/test-project.c b/tests/interactive/test-project.c index f61fff4..29bc047 100644 --- a/tests/interactive/test-project.c +++ b/tests/interactive/test-project.c @@ -6,7 +6,7 @@ static ClutterActor *main_stage, *rect, *p[5]; static void -init_handles () +init_handles (void) { gint i; ClutterVertex v[4]; @@ -49,7 +49,7 @@ init_handles () } static void -place_handles () +place_handles (void) { gint i; ClutterVertex v[4]; diff --git a/tests/micro-bench/test-text-perf.c b/tests/micro-bench/test-text-perf.c index 2be7f27..f21cdc3 100644 --- a/tests/micro-bench/test-text-perf.c +++ b/tests/micro-bench/test-text-perf.c @@ -44,7 +44,7 @@ queue_redraw (gpointer stage) } static ClutterActor * -create_label () +create_label (void) { ClutterColor label_color = { 0xff, 0xff, 0xff, 0xff }; ClutterActor *label; -- 2.7.4