Commit 958732d2 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed warnings.

parent 9a7cc230
......@@ -510,7 +510,6 @@ static void ADPCM_Reset(PACMDRVSTREAMINSTANCE adsi, AcmAdpcmData* aad)
static LRESULT ADPCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
{
AcmAdpcmData* aad;
unsigned nspb;
assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
......@@ -538,17 +537,20 @@ static LRESULT ADPCM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
adsi->pwfxDst->wBitsPerSample != 16)
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
* 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;
#if 0
{
unsigned int nspb = ((IMAADPCMWAVEFORMAT*)adsi->pwfxSrc)->wSamplesPerBlock;
FIXME("spb=%u\n", nspb);
/* we check that in a block, after the header, samples are present on
* 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
/* adpcm decoding... */
......
......@@ -26,5 +26,6 @@
extern void pdump (LPCITEMIDLIST pidl);
extern BOOL pcheck (LPCITEMIDLIST pidl);
extern const char * shdebugstr_guid( const struct _GUID *id );
#endif /* __WINE_SHELL32_DEBUGHLP_H */
......@@ -22,15 +22,16 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <values.h>
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif
......@@ -43,8 +44,8 @@
#include "dsound.h"
#include "dsdriver.h"
#include "alsa.h"
#include "wine/library.h"
#include "wine/debug.h"
#include "wine/port.h"
WINE_DEFAULT_DEBUG_CHANNEL(wave);
......@@ -153,6 +154,7 @@ static DWORD ALSA_WodNumDevs;
static DWORD wodDsCreate(UINT wDevID, PIDSDRIVER* drv);
/* These strings used only for tracing */
#if 0
static const char *wodPlayerCmdString[] = {
"WINE_WM_PAUSING",
"WINE_WM_RESTARTING",
......@@ -162,6 +164,7 @@ static const char *wodPlayerCmdString[] = {
"WINE_WM_BREAKLOOP",
"WINE_WM_CLOSING",
};
#endif
/*======================================================================*
* 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");
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_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");
......@@ -1635,7 +1638,6 @@ static void DSDB_MMAPCopy(IDsDriverBufferImpl* pdbi)
snd_pcm_format_t format;
snd_pcm_uframes_t period_size;
snd_pcm_sframes_t avail;
snd_pcm_state_t state;
if ( !pdbi->mmap_buffer || !wwo->hw_params || !wwo->p_handle)
return;
......
......@@ -602,6 +602,7 @@ static BOOL SMB_TreeConnect(int fd, USHORT user_id, LPCSTR share_name, USHORT *t
return TRUE;
}
#if 0 /* not yet */
static BOOL SMB_NtCreateOpen(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
LPCSTR filename, DWORD access, DWORD sharing,
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;
}
#endif
static USHORT SMB_GetMode(DWORD access, DWORD sharing)
{
......@@ -723,6 +725,7 @@ static USHORT SMB_GetMode(DWORD access, DWORD sharing)
return mode;
}
#if 0 /* not yet */
/* inverse of FILE_ConvertOFMode */
static BOOL SMB_OpenAndX(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
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 */
return FALSE;
}
#endif
static BOOL SMB_Open(int fd, USHORT tree_id, USHORT user_id, USHORT dialect,
LPCSTR filename, DWORD access, DWORD sharing,
......@@ -1122,4 +1126,3 @@ BOOL WINAPI SMB_ReadFile(HANDLE hFile, LPVOID buffer, DWORD bytesToRead, LPDWORD
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)
ERR("Standard load address for a Win32 program (0x00400000) not available - security-patched kernel ?\n");
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,
(nt->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?
"relocation records are stripped" : "no relocation records present" );
......
......@@ -96,7 +96,7 @@ VOID LANGUAGE_LoadMenus(VOID)
/* Create menu */
hMainMenu = LoadMenu(Globals.hInstance, MAIN_MENU);
hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
Globals.hPropertiesMenu = GetSubMenu(hMainMenu, 0);
Globals.hLanguageMenu = GetSubMenu(hMainMenu, 1);
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)
{
......@@ -81,7 +70,7 @@ VOID LANGUAGE_LoadMenus(VOID)
/*lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3);*/
/* Create menu */
hMainMenu = LoadMenu(Globals.hInstance, MAIN_MENU);
hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
Globals.hEditMenu = GetSubMenu(hMainMenu, 1);
Globals.hSearchMenu = GetSubMenu(hMainMenu, 2);
......
......@@ -299,7 +299,7 @@ VOID WINHELP_CreateHelpWindow(LPCSTR lpszFile, LONG lHash, LPCSTR lpszWindow,
page ? page->file->lpszTitle : szCaption,
bPopup ? WS_POPUPWINDOW | WS_BORDER : WS_OVERLAPPEDWINDOW,
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);
ShowWindow (hWnd, nCmdShow);
......
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