[hitori] build: Fix -Werror build for clang
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hitori] build: Fix -Werror build for clang
- Date: Tue, 9 Jun 2015 07:39:55 +0000 (UTC)
commit 263efcc10124ac45d70d88cfc66e1b97c11e5c60
Author: Ting-Wei Lan <lantw src gnome org>
Date: Sat Jun 6 09:20:02 2015 +0800
build: Fix -Werror build for clang
This prevents 'void function should not return void expression' warning.
https://bugzilla.gnome.org/show_bug.cgi?id=750482
src/generator.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/generator.c b/src/generator.c
index 066a0e6..4978985 100644
--- a/src/generator.c
+++ b/src/generator.c
@@ -92,7 +92,8 @@ hitori_generate_board (Hitori *hitori, guint new_board_size, gint seed)
g_slice_free1 (sizeof (gboolean) * (hitori->board_size + 2), horiz_accum[iter.x]);
g_free (horiz_accum);
- return hitori_generate_board (hitori, hitori->board_size, seed + 1);
+ hitori_generate_board (hitori, hitori->board_size, seed + 1);
+ return;
}
/* Fill in the squares, leaving the painted ones blank,
@@ -119,7 +120,8 @@ hitori_generate_board (Hitori *hitori, guint new_board_size, gint seed)
g_slice_free1 (sizeof (gboolean) *
(hitori->board_size + 2), horiz_accum[iter.x]);
g_free (horiz_accum);
- return hitori_generate_board (hitori, hitori->board_size,
seed + 1); /* We're buggered */
+ hitori_generate_board (hitori, hitori->board_size, seed + 1);
/* We're buggered */
+ return;
}
i = rand () % (hitori->board_size + 1) + 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]