From: Carl Worth <carl@theworths.org>
Date: Fri, 11 Nov 2005 21:13:59 +0000 (+0000)
Subject: 2005-11-11  Carl Worth  <cworth@pippin.local>
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=ded32923a25488449be27687013845d7fa0e9e5e;p=ttt

2005-11-11  Carl Worth  <cworth@pippin.local>

        * src/ttt-server.c: (main): Don't assign to stderr which is
        apparently an invalid lvalue on Mac OS X.

        * src/x.h:
        * src/x.c: (xfreopen): Change return type to void.

        * src/ttt-board.c: (ttt_board_to_string): Add missing return
        statement.
---

diff --git a/ChangeLog b/ChangeLog
index 24fa00b..d7cc7f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-11-11  Carl Worth  <cworth@pippin.local>
+
+	* src/ttt-server.c: (main): Don't assign to stderr which is
+	apparently an invalid lvalue on Mac OS X.
+
+	* src/x.h:
+	* src/x.c: (xfreopen): Change return type to void.
+
+	* src/ttt-board.c: (ttt_board_to_string): Add missing return
+	statement.
+
 2005-11-11  Carl Worth  <cworth@cworth.org>
 
 	* configure.in: Key off of src/ttt.h instead of src/ttt.c which no
diff --git a/src/ttt-board.c b/src/ttt-board.c
index 582b85f..7627b4d 100644
--- a/src/ttt-board.c
+++ b/src/ttt-board.c
@@ -55,6 +55,7 @@ char *
 ttt_board_to_string (ttt_board_t *board)
 {
     /* XXX: NYI */
+    return NULL;
 }
 
 /* Write a string representation of a board to the provided file.
diff --git a/src/ttt-server.c b/src/ttt-server.c
index 2cac117..62c02cc 100644
--- a/src/ttt-server.c
+++ b/src/ttt-server.c
@@ -67,7 +67,7 @@ main (int argc, char **argv)
     ttt_args_parse (&args, argc, argv);
 
     if (args.log_file)
-	stderr = xfreopen (args.log_file, "a", stderr);
+	xfreopen (args.log_file, "a", stderr);
 
     socket = ttt_socket_create_server (args.host, args.port);
 
diff --git a/src/x.c b/src/x.c
index 5456642..18c69a4 100644
--- a/src/x.c
+++ b/src/x.c
@@ -133,7 +133,7 @@ xfdopen (int filedes, const char *mode)
     return ret;
 }
 
-FILE *
+void
 xfreopen (const char *path, const char *mode, FILE *stream)
 {
     FILE *ret;
@@ -144,8 +144,6 @@ xfreopen (const char *path, const char *mode, FILE *stream)
 		 path, strerror (errno));
 	exit (1);
     }
-
-    return ret;
 }
 
 char *
diff --git a/src/x.h b/src/x.h
index 58f1297..868a567 100644
--- a/src/x.h
+++ b/src/x.h
@@ -48,7 +48,7 @@ xrealloc (void *ptr, size_t size);
 FILE *
 xfdopen (int filedes, const char *mode);
 
-FILE *
+void
 xfreopen (const char *path, const char *mode, FILE *stream);
 
 char *