gnome-games r7318 - trunk/libgames-support



Author: chpe
Date: Thu Feb  7 22:03:21 2008
New Revision: 7318
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7318&view=rev

Log:
2008-02-07  Christian Persch  <chpe gnome org>

	* games-setgid-io.c: (write_n_bytes), (read_n_bytes),
	(setgid_io_stat), (setgid_io_stat_priv): Don't do pointer arithmetic
	on void*. Fixes compiler warnings.

Modified:
   trunk/libgames-support/ChangeLog
   trunk/libgames-support/games-setgid-io.c

Modified: trunk/libgames-support/games-setgid-io.c
==============================================================================
--- trunk/libgames-support/games-setgid-io.c	(original)
+++ trunk/libgames-support/games-setgid-io.c	Thu Feb  7 22:03:21 2008
@@ -100,7 +100,7 @@
 
 
 static gboolean
-write_n_bytes (int fd, const void *buffer, int n)
+write_n_bytes (int fd, const char *buffer, int n)
 {
   int totalcnt;
   int cnt;
@@ -117,7 +117,7 @@
 }
 
 static gboolean
-read_n_bytes (int fd, void *buffer, int n)
+read_n_bytes (int fd, char *buffer, int n)
 {
   int totalcnt;
   int cnt;
@@ -405,7 +405,7 @@
   write_int (setgid_io_outfd, length);
   write_n_bytes (setgid_io_outfd, filename, length);
 
-  read_n_bytes (setgid_io_infd, buffer, sizeof (struct stat));
+  read_n_bytes (setgid_io_infd, (char *) buffer, sizeof (struct stat));
   return read_int (setgid_io_infd);
 }
 
@@ -424,7 +424,7 @@
 
   result = stat (filename, &buffer);
 
-  write_n_bytes (outfd, &buffer, sizeof (struct stat));
+  write_n_bytes (outfd, (char *) &buffer, sizeof (struct stat));
   write_int (outfd, result);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]