Fix warnings for Linux, FreeBSD and Solaris.

This commit is contained in:
Francois Gouget 2002-04-01 21:08:16 +00:00 committed by Alexandre Julliard
parent e16bb784a3
commit 0763abf115
4 changed files with 13 additions and 10 deletions

View File

@ -181,11 +181,10 @@ static DWORD CDROM_SetTray(int dev, BOOL doEject)
*/
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
@ -324,11 +323,10 @@ static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt,
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;
@ -410,6 +408,9 @@ static DWORD CDROM_ReadQChannel(int dev, const CDROM_SUB_Q_DATA_FORMAT* fmt,
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;

View File

@ -127,6 +127,7 @@ static BOOL fontcmp(LFANDSIZE *p1, LFANDSIZE *p2)
return strcmpW(p1->lf.lfFaceName, p2->lf.lfFaceName);
}
#if 0
static void walk_cache(void)
{
int i;
@ -134,6 +135,7 @@ static void walk_cache(void)
for(i=mru; i >= 0; i = glyphsetCache[i].next)
TRACE("item %d\n", i);
}
#endif
static gsCacheEntry *LookupEntry(LFANDSIZE *plfsz)
{

View File

@ -585,7 +585,7 @@ void *wine_dlopen( const char *filename, int flag, char *error, int errorsize )
{
#ifdef HAVE_DLOPEN
void *ret;
char *s;
const char *s;
dlerror(); dlerror();
ret = dlopen( filename, flag );
s = dlerror();
@ -613,7 +613,7 @@ void *wine_dlsym( void *handle, const char *symbol, char *error, int errorsize )
{
#ifdef HAVE_DLOPEN
void *ret;
char *s;
const char *s;
dlerror(); dlerror();
ret = dlsym( handle, symbol );
s = dlerror();
@ -641,7 +641,7 @@ int wine_dlclose( void *handle, char *error, int errorsize )
{
#ifdef HAVE_DLOPEN
int ret;
char *s;
const char *s;
dlerror(); dlerror();
ret = dlclose( handle );
s = dlerror();

View File

@ -203,7 +203,7 @@ static void send_reply( union generic_reply *reply )
{
struct iovec vec[2];
vec[0].iov_base = reply;
vec[0].iov_base = (void *)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 @@ int receive_fd( struct process *process )
cmsg.fd = -1;
#endif /* HAVE_MSGHDR_ACCRIGHTS */
myiovec.iov_base = &data;
myiovec.iov_base = (void *)&data;
myiovec.iov_len = sizeof(data);
ret = recvmsg( process->obj.fd, &msghdr, 0 );