Warning fixes

Francois Gouget fgouget at codeweavers.com
Sun Mar 31 21:28:53 CST 2002



Changelog:

   François Gouget <fgouget at codeweavers.com>

 * dlls/ntdll/cdrom.c,
   dlls/x11drv/xrender.c,
   library/port.c,
   server/request.c,
   tools/winebuild/relay.c

   Fix warnings for Linux, FreeBSD and Solaris


-- 
François Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/ntdll/cdrom.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.4
diff -u -r1.4 cdrom.c
--- dlls/ntdll/cdrom.c	9 Mar 2002 23:39:09 -0000	1.4
+++ dlls/ntdll/cdrom.c	30 Mar 2002 19:15:19 -0000
@@ -179,11 +179,10 @@
  */
 static DWORD CDROM_ControlEjection(int dev, const PREVENT_MEDIA_REMOVAL* rmv)
 {
-    int val = rmv->PreventMediaRemoval;
 #if defined(linux)
-    return CDROM_GetStatusCode(ioctl(dev, CDROM_LOCKDOOR, val));
+    return CDROM_GetStatusCode(ioctl(dev, CDROM_LOCKDOOR, rmv->PreventMediaRemoval));
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
-    return CDROM_GetStatusCode(ioctl(dev, (val) ? CDIOCPREVENT : CDIOCALLOW, NULL));
+    return CDROM_GetStatusCode(ioctl(dev, (rmv->PreventMediaRemoval) ? CDIOCPREVENT : CDIOCALLOW, NULL));
 #else
     return STATUS_NOT_SUPPORTED;
 #endif
@@ -322,11 +321,10 @@
                                 SUB_Q_CHANNEL_DATA* data)
 {
     DWORD               ret = STATUS_NOT_SUPPORTED;
+#ifdef linux
     unsigned            size;
     SUB_Q_HEADER*       hdr = (SUB_Q_HEADER*)data;
     int                 io;
-
-#ifdef linux
     struct cdrom_subchnl	sc;
     sc.cdsc_format = CDROM_MSF;
 
@@ -408,6 +406,9 @@
  end:
     ret = CDROM_GetStatusCode(io);
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
+    unsigned            size;
+    SUB_Q_HEADER*       hdr = (SUB_Q_HEADER*)data;
+    int                 io;
     struct ioc_read_subchannel	read_sc;
     struct cd_sub_channel_info	sc;
 
Index: dlls/x11drv/xrender.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/xrender.c,v
retrieving revision 1.2
diff -u -r1.2 xrender.c
--- dlls/x11drv/xrender.c	9 Mar 2002 23:44:35 -0000	1.2
+++ dlls/x11drv/xrender.c	30 Mar 2002 19:15:25 -0000
@@ -127,6 +127,7 @@
   return strcmpW(p1->lf.lfFaceName, p2->lf.lfFaceName);
 }
 
+#if 0
 static void walk_cache(void)
 {
   int i;
@@ -134,6 +135,7 @@
   for(i=mru; i >= 0; i = glyphsetCache[i].next)
     TRACE("item %d\n", i);
 }
+#endif
 
 static gsCacheEntry *LookupEntry(LFANDSIZE *plfsz)
 {
Index: library/port.c
===================================================================
RCS file: /home/wine/wine/library/port.c,v
retrieving revision 1.24
diff -u -r1.24 port.c
--- library/port.c	11 Mar 2002 05:08:38 -0000	1.24
+++ library/port.c	30 Mar 2002 19:15:34 -0000
@@ -582,7 +582,7 @@
 {
 #ifdef HAVE_DLOPEN
     void *ret;
-    char *s;
+    const char *s;
     dlerror(); dlerror();
     ret = dlopen( filename, flag );
     s = dlerror();
@@ -610,7 +610,7 @@
 {
 #ifdef HAVE_DLOPEN
     void *ret;
-    char *s;
+    const char *s;
     dlerror(); dlerror();
     ret = dlsym( handle, symbol );
     s = dlerror();
@@ -638,7 +638,7 @@
 {
 #ifdef HAVE_DLOPEN
     int ret;
-    char *s;
+    const char *s;
     dlerror(); dlerror();
     ret = dlclose( handle );
     s = dlerror();
Index: server/request.c
===================================================================
RCS file: /home/wine/wine/server/request.c,v
retrieving revision 1.61
diff -u -r1.61 request.c
--- server/request.c	10 Mar 2002 00:18:36 -0000	1.61
+++ server/request.c	30 Mar 2002 19:15:42 -0000
@@ -203,7 +203,7 @@
     {
         struct iovec vec[2];
 
-        vec[0].iov_base = reply;
+        vec[0].iov_base = (char*)reply;
         vec[0].iov_len  = sizeof(*reply);
         vec[1].iov_base = current->reply_data;
         vec[1].iov_len  = current->reply_size;
@@ -321,7 +321,7 @@
     cmsg.fd = -1;
 #endif  /* HAVE_MSGHDR_ACCRIGHTS */
 
-    myiovec.iov_base = &data;
+    myiovec.iov_base = (char*)&data;
     myiovec.iov_len  = sizeof(data);
 
     ret = recvmsg( process->obj.fd, &msghdr, 0 );
Index: tools/winebuild/relay.c
===================================================================
RCS file: /home/wine/wine/tools/winebuild/relay.c,v
retrieving revision 1.17
diff -u -r1.17 relay.c
--- tools/winebuild/relay.c	11 Mar 2002 05:09:02 -0000	1.17
+++ tools/winebuild/relay.c	30 Mar 2002 19:15:48 -0000
@@ -1148,7 +1148,9 @@
  */
 void BuildRelays16( FILE *outfile )
 {
+#ifdef USE_STABS
     char buffer[1024];
+#endif
 
     /* File header */
 


More information about the wine-patches mailing list