Commit 0763abf1 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Fix warnings for Linux, FreeBSD and Solaris.

parent e16bb784
...@@ -181,11 +181,10 @@ static DWORD CDROM_SetTray(int dev, BOOL doEject) ...@@ -181,11 +181,10 @@ static DWORD CDROM_SetTray(int dev, BOOL doEject)
*/ */
static DWORD CDROM_ControlEjection(int dev, const PREVENT_MEDIA_REMOVAL* rmv) static DWORD CDROM_ControlEjection(int dev, const PREVENT_MEDIA_REMOVAL* rmv)
{ {
int val = rmv->PreventMediaRemoval;
#if defined(linux) #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__) #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 #else
return STATUS_NOT_SUPPORTED; return STATUS_NOT_SUPPORTED;
#endif #endif
...@@ -324,11 +323,10 @@ static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt, ...@@ -324,11 +323,10 @@ static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt,
SUB_Q_CHANNEL_DATA* data) SUB_Q_CHANNEL_DATA* data)
{ {
DWORD ret = STATUS_NOT_SUPPORTED; DWORD ret = STATUS_NOT_SUPPORTED;
#ifdef linux
unsigned size; unsigned size;
SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data; SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data;
int io; int io;
#ifdef linux
struct cdrom_subchnl sc; struct cdrom_subchnl sc;
sc.cdsc_format = CDROM_MSF; sc.cdsc_format = CDROM_MSF;
...@@ -410,6 +408,9 @@ static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt, ...@@ -410,6 +408,9 @@ static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt,
end: end:
ret = CDROM_GetStatusCode(io); ret = CDROM_GetStatusCode(io);
#elif defined(__FreeBSD__) || defined(__NetBSD__) #elif defined(__FreeBSD__) || defined(__NetBSD__)
unsigned size;
SUB_Q_HEADER* hdr = (SUB_Q_HEADER*)data;
int io;
struct ioc_read_subchannel read_sc; struct ioc_read_subchannel read_sc;
struct cd_sub_channel_info sc; struct cd_sub_channel_info sc;
......
...@@ -127,6 +127,7 @@ static BOOL fontcmp(LFANDSIZE *p1, LFANDSIZE *p2) ...@@ -127,6 +127,7 @@ static BOOL fontcmp(LFANDSIZE *p1, LFANDSIZE *p2)
return strcmpW(p1->lf.lfFaceName, p2->lf.lfFaceName); return strcmpW(p1->lf.lfFaceName, p2->lf.lfFaceName);
} }
#if 0
static void walk_cache(void) static void walk_cache(void)
{ {
int i; int i;
...@@ -134,6 +135,7 @@ static void walk_cache(void) ...@@ -134,6 +135,7 @@ static void walk_cache(void)
for(i=mru; i >= 0; i = glyphsetCache[i].next) for(i=mru; i >= 0; i = glyphsetCache[i].next)
TRACE("item %d\n", i); TRACE("item %d\n", i);
} }
#endif
static gsCacheEntry *LookupEntry(LFANDSIZE *plfsz) static gsCacheEntry *LookupEntry(LFANDSIZE *plfsz)
{ {
......
...@@ -585,7 +585,7 @@ void *wine_dlopen( const char *filename, int flag, char *error, int errorsize ) ...@@ -585,7 +585,7 @@ void *wine_dlopen( const char *filename, int flag, char *error, int errorsize )
{ {
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
void *ret; void *ret;
char *s; const char *s;
dlerror(); dlerror(); dlerror(); dlerror();
ret = dlopen( filename, flag ); ret = dlopen( filename, flag );
s = dlerror(); s = dlerror();
...@@ -613,7 +613,7 @@ void *wine_dlsym( void *handle, const char *symbol, char *error, int errorsize ) ...@@ -613,7 +613,7 @@ void *wine_dlsym( void *handle, const char *symbol, char *error, int errorsize )
{ {
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
void *ret; void *ret;
char *s; const char *s;
dlerror(); dlerror(); dlerror(); dlerror();
ret = dlsym( handle, symbol ); ret = dlsym( handle, symbol );
s = dlerror(); s = dlerror();
...@@ -641,7 +641,7 @@ int wine_dlclose( void *handle, char *error, int errorsize ) ...@@ -641,7 +641,7 @@ int wine_dlclose( void *handle, char *error, int errorsize )
{ {
#ifdef HAVE_DLOPEN #ifdef HAVE_DLOPEN
int ret; int ret;
char *s; const char *s;
dlerror(); dlerror(); dlerror(); dlerror();
ret = dlclose( handle ); ret = dlclose( handle );
s = dlerror(); s = dlerror();
......
...@@ -203,7 +203,7 @@ static void send_reply( union generic_reply *reply ) ...@@ -203,7 +203,7 @@ static void send_reply( union generic_reply *reply )
{ {
struct iovec vec[2]; struct iovec vec[2];
vec[0].iov_base = reply; vec[0].iov_base = (void *)reply;
vec[0].iov_len = sizeof(*reply); vec[0].iov_len = sizeof(*reply);
vec[1].iov_base = current->reply_data; vec[1].iov_base = current->reply_data;
vec[1].iov_len = current->reply_size; vec[1].iov_len = current->reply_size;
...@@ -321,7 +321,7 @@ int receive_fd( struct process *process ) ...@@ -321,7 +321,7 @@ int receive_fd( struct process *process )
cmsg.fd = -1; cmsg.fd = -1;
#endif /* HAVE_MSGHDR_ACCRIGHTS */ #endif /* HAVE_MSGHDR_ACCRIGHTS */
myiovec.iov_base = &data; myiovec.iov_base = (void *)&data;
myiovec.iov_len = sizeof(data); myiovec.iov_len = sizeof(data);
ret = recvmsg( process->obj.fd, &msghdr, 0 ); ret = recvmsg( process->obj.fd, &msghdr, 0 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment