mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 06:46:46 +00:00
Fixed warnings.
This commit is contained in:
parent
9a7cc230dc
commit
958732d21c
|
@ -510,7 +510,6 @@ static void ADPCM_Reset(PACMDRVSTREAMINSTANCE adsi, AcmAdpcmData* aad)
|
||||||
static LRESULT ADPCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
|
static LRESULT ADPCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
|
||||||
{
|
{
|
||||||
AcmAdpcmData* aad;
|
AcmAdpcmData* aad;
|
||||||
unsigned nspb;
|
|
||||||
|
|
||||||
assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
|
assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
|
||||||
|
|
||||||
|
@ -538,17 +537,20 @@ static LRESULT ADPCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
|
||||||
adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
|
adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
|
||||||
adsi->pwfxDst->wBitsPerSample != 16)
|
adsi->pwfxDst->wBitsPerSample != 16)
|
||||||
goto theEnd;
|
goto theEnd;
|
||||||
#if 0
|
|
||||||
nspb = ((IMAADPCMWAVEFORMAT*)adsi->pwfxSrc)->wSamplesPerBlock;
|
|
||||||
FIXME("spb=%u\n", nspb);
|
|
||||||
|
|
||||||
/* we check that in a block, after the header, samples are present on
|
#if 0
|
||||||
* 4-sample packet pattern
|
{
|
||||||
* we also check that the block alignement is bigger than the expected size
|
unsigned int nspb = ((IMAADPCMWAVEFORMAT*)adsi->pwfxSrc)->wSamplesPerBlock;
|
||||||
*/
|
FIXME("spb=%u\n", nspb);
|
||||||
if (((nspb - 1) & 3) != 0) goto theEnd;
|
|
||||||
if ((((nspb - 1) / 2) + 4) * adsi->pwfxSrc->nChannels < adsi->pwfxSrc->nBlockAlign)
|
/* we check that in a block, after the header, samples are present on
|
||||||
goto theEnd;
|
* 4-sample packet pattern
|
||||||
|
* we also check that the block alignement is bigger than the expected size
|
||||||
|
*/
|
||||||
|
if (((nspb - 1) & 3) != 0) goto theEnd;
|
||||||
|
if ((((nspb - 1) / 2) + 4) * adsi->pwfxSrc->nChannels < adsi->pwfxSrc->nBlockAlign)
|
||||||
|
goto theEnd;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* adpcm decoding... */
|
/* adpcm decoding... */
|
||||||
|
|
|
@ -26,5 +26,6 @@
|
||||||
|
|
||||||
extern void pdump (LPCITEMIDLIST pidl);
|
extern void pdump (LPCITEMIDLIST pidl);
|
||||||
extern BOOL pcheck (LPCITEMIDLIST pidl);
|
extern BOOL pcheck (LPCITEMIDLIST pidl);
|
||||||
|
extern const char * shdebugstr_guid( const struct _GUID *id );
|
||||||
|
|
||||||
#endif /* __WINE_SHELL32_DEBUGHLP_H */
|
#endif /* __WINE_SHELL32_DEBUGHLP_H */
|
||||||
|
|
|
@ -22,15 +22,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "wine/port.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <values.h>
|
|
||||||
#ifdef HAVE_SYS_MMAN_H
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
# include <sys/mman.h>
|
# include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -43,8 +44,8 @@
|
||||||
#include "dsound.h"
|
#include "dsound.h"
|
||||||
#include "dsdriver.h"
|
#include "dsdriver.h"
|
||||||
#include "alsa.h"
|
#include "alsa.h"
|
||||||
|
#include "wine/library.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(wave);
|
WINE_DEFAULT_DEBUG_CHANNEL(wave);
|
||||||
|
|
||||||
|
@ -153,6 +154,7 @@ static DWORD ALSA_WodNumDevs;
|
||||||
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
|
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
|
||||||
|
|
||||||
/* These strings used only for tracing */
|
/* These strings used only for tracing */
|
||||||
|
#if 0
|
||||||
static const char *wodPlayerCmdString[] = {
|
static const char *wodPlayerCmdString[] = {
|
||||||
"WINE_WM_PAUSING",
|
"WINE_WM_PAUSING",
|
||||||
"WINE_WM_RESTARTING",
|
"WINE_WM_RESTARTING",
|
||||||
|
@ -162,6 +164,7 @@ static const char *wodPlayerCmdString[] = {
|
||||||
"WINE_WM_BREAKLOOP",
|
"WINE_WM_BREAKLOOP",
|
||||||
"WINE_WM_CLOSING",
|
"WINE_WM_CLOSING",
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/*======================================================================*
|
/*======================================================================*
|
||||||
* Low level WAVE implementation *
|
* Low level WAVE implementation *
|
||||||
|
@ -1142,7 +1145,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
|
||||||
EXIT_ON_ERROR( snd_pcm_hw_params(pcm, hw_params), MMSYSERR_INVALPARAM, "unable to set hw params for playback");
|
EXIT_ON_ERROR( snd_pcm_hw_params(pcm, hw_params), MMSYSERR_INVALPARAM, "unable to set hw params for playback");
|
||||||
|
|
||||||
snd_pcm_sw_params_current(pcm, sw_params);
|
snd_pcm_sw_params_current(pcm, sw_params);
|
||||||
EXIT_ON_ERROR( snd_pcm_sw_params_set_start_threshold(pcm, sw_params, dwFlags & WAVE_DIRECTSOUND ? MAXINT : 1 ), MMSYSERR_ERROR, "unable to set start threshold");
|
EXIT_ON_ERROR( snd_pcm_sw_params_set_start_threshold(pcm, sw_params, dwFlags & WAVE_DIRECTSOUND ? INT_MAX : 1 ), MMSYSERR_ERROR, "unable to set start threshold");
|
||||||
EXIT_ON_ERROR( snd_pcm_sw_params_set_silence_size(pcm, sw_params, period_size*2), MMSYSERR_ERROR, "unable to set silence size");
|
EXIT_ON_ERROR( snd_pcm_sw_params_set_silence_size(pcm, sw_params, period_size*2), MMSYSERR_ERROR, "unable to set silence size");
|
||||||
EXIT_ON_ERROR( snd_pcm_sw_params_set_avail_min(pcm, sw_params, period_size), MMSYSERR_ERROR, "unable to set avail min");
|
EXIT_ON_ERROR( snd_pcm_sw_params_set_avail_min(pcm, sw_params, period_size), MMSYSERR_ERROR, "unable to set avail min");
|
||||||
EXIT_ON_ERROR( snd_pcm_sw_params_set_xfer_align(pcm, sw_params, 1), MMSYSERR_ERROR, "unable to set xfer align");
|
EXIT_ON_ERROR( snd_pcm_sw_params_set_xfer_align(pcm, sw_params, 1), MMSYSERR_ERROR, "unable to set xfer align");
|
||||||
|
@ -1635,7 +1638,6 @@ static void DSDB_MMAPCopy(IDsDriverBufferImpl* pdbi)
|
||||||
snd_pcm_format_t format;
|
snd_pcm_format_t format;
|
||||||
snd_pcm_uframes_t period_size;
|
snd_pcm_uframes_t period_size;
|
||||||
snd_pcm_sframes_t avail;
|
snd_pcm_sframes_t avail;
|
||||||
snd_pcm_state_t state;
|
|
||||||
|
|
||||||
if ( !pdbi->mmap_buffer || !wwo->hw_params || !wwo->p_handle)
|
if ( !pdbi->mmap_buffer || !wwo->hw_params || !wwo->p_handle)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -602,6 +602,7 @@ static BOOL SMB_TreeConnect(int fd, USHORT user_id, LPCSTR share_name, USHORT *t
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* not yet */
|
||||||
static BOOL SMB_NtCreateOpen(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
|
static BOOL SMB_NtCreateOpen(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
|
||||||
LPCSTR filename, DWORD access, DWORD sharing,
|
LPCSTR filename, DWORD access, DWORD sharing,
|
||||||
LPSECURITY_ATTRIBUTES sa, DWORD creation,
|
LPSECURITY_ATTRIBUTES sa, DWORD creation,
|
||||||
|
@ -686,6 +687,7 @@ static BOOL SMB_NtCreateOpen(int fd, USHORT tree_id, USHORT user_id, USHORT dial
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static USHORT SMB_GetMode(DWORD access, DWORD sharing)
|
static USHORT SMB_GetMode(DWORD access, DWORD sharing)
|
||||||
{
|
{
|
||||||
|
@ -723,6 +725,7 @@ static USHORT SMB_GetMode(DWORD access, DWORD sharing)
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* not yet */
|
||||||
/* inverse of FILE_ConvertOFMode */
|
/* inverse of FILE_ConvertOFMode */
|
||||||
static BOOL SMB_OpenAndX(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
|
static BOOL SMB_OpenAndX(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
|
||||||
LPCSTR filename, DWORD access, DWORD sharing,
|
LPCSTR filename, DWORD access, DWORD sharing,
|
||||||
|
@ -753,6 +756,7 @@ static BOOL SMB_OpenAndX(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
|
||||||
/*FIXME: complete */
|
/*FIXME: complete */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static BOOL SMB_Open(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
|
static BOOL SMB_Open(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
|
||||||
LPCSTR filename, DWORD access, DWORD sharing,
|
LPCSTR filename, DWORD access, DWORD sharing,
|
||||||
|
@ -1122,4 +1126,3 @@ BOOL WINAPI SMB_ReadFile(HANDLE hFile, LPVOID buffer, DWORD bytesToRead, LPDWORD
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -396,7 +396,7 @@ static int do_relocations( char *base, const IMAGE_NT_HEADERS *nt, const char *f
|
||||||
if (nt->OptionalHeader.ImageBase == 0x400000)
|
if (nt->OptionalHeader.ImageBase == 0x400000)
|
||||||
ERR("Standard load address for a Win32 program (0x00400000) not available - security-patched kernel ?\n");
|
ERR("Standard load address for a Win32 program (0x00400000) not available - security-patched kernel ?\n");
|
||||||
else
|
else
|
||||||
ERR( "FATAL: Need to relocate %s from addr %p, but %s\n",
|
ERR( "FATAL: Need to relocate %s from addr %lx, but %s\n",
|
||||||
filename, nt->OptionalHeader.ImageBase,
|
filename, nt->OptionalHeader.ImageBase,
|
||||||
(nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?
|
(nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?
|
||||||
"relocation records are stripped" : "no relocation records present" );
|
"relocation records are stripped" : "no relocation records present" );
|
||||||
|
|
|
@ -96,7 +96,7 @@ VOID LANGUAGE_LoadMenus(VOID)
|
||||||
|
|
||||||
|
|
||||||
/* Create menu */
|
/* Create menu */
|
||||||
hMainMenu = LoadMenu(Globals.hInstance, MAIN_MENU);
|
hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
|
||||||
Globals.hPropertiesMenu = GetSubMenu(hMainMenu, 0);
|
Globals.hPropertiesMenu = GetSubMenu(hMainMenu, 0);
|
||||||
Globals.hLanguageMenu = GetSubMenu(hMainMenu, 1);
|
Globals.hLanguageMenu = GetSubMenu(hMainMenu, 1);
|
||||||
Globals.hInfoMenu = GetSubMenu(hMainMenu, 2);
|
Globals.hInfoMenu = GetSubMenu(hMainMenu, 2);
|
||||||
|
|
|
@ -57,17 +57,6 @@ void LANGUAGE_UpdateWindowCaption(void) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL LANGUAGE_LoadStringOther(UINT num, UINT ids, LPSTR str, UINT len)
|
|
||||||
{
|
|
||||||
BOOL bOk;
|
|
||||||
|
|
||||||
ids -= Globals.wStringTableOffset;
|
|
||||||
ids += num * 0x100;
|
|
||||||
|
|
||||||
bOk = LoadString(Globals.hInstance, ids, str, len);
|
|
||||||
|
|
||||||
return(bOk);
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID LANGUAGE_LoadMenus(VOID)
|
VOID LANGUAGE_LoadMenus(VOID)
|
||||||
{
|
{
|
||||||
|
@ -81,7 +70,7 @@ VOID LANGUAGE_LoadMenus(VOID)
|
||||||
/*lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3);*/
|
/*lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3);*/
|
||||||
|
|
||||||
/* Create menu */
|
/* Create menu */
|
||||||
hMainMenu = LoadMenu(Globals.hInstance, MAIN_MENU);
|
hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
|
||||||
Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
|
Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
|
||||||
Globals.hEditMenu = GetSubMenu(hMainMenu, 1);
|
Globals.hEditMenu = GetSubMenu(hMainMenu, 1);
|
||||||
Globals.hSearchMenu = GetSubMenu(hMainMenu, 2);
|
Globals.hSearchMenu = GetSubMenu(hMainMenu, 2);
|
||||||
|
|
|
@ -299,7 +299,7 @@ VOID WINHELP_CreateHelpWindow(LPCSTR lpszFile, LONG lHash, LPCSTR lpszWindow,
|
||||||
page ? page->file->lpszTitle : szCaption,
|
page ? page->file->lpszTitle : szCaption,
|
||||||
bPopup ? WS_POPUPWINDOW | WS_BORDER : WS_OVERLAPPEDWINDOW,
|
bPopup ? WS_POPUPWINDOW | WS_BORDER : WS_OVERLAPPEDWINDOW,
|
||||||
origin.x, origin.y, size.cx, size.cy,
|
origin.x, origin.y, size.cx, size.cy,
|
||||||
0, bPrimary ? LoadMenu(Globals.hInstance, MAIN_MENU) : 0,
|
0, bPrimary ? LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU)) : 0,
|
||||||
Globals.hInstance, win);
|
Globals.hInstance, win);
|
||||||
|
|
||||||
ShowWindow (hWnd, nCmdShow);
|
ShowWindow (hWnd, nCmdShow);
|
||||||
|
|
Loading…
Reference in a new issue