mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 10:59:00 +00:00
joy.cpl: Avoid pointers to out of scope variables (PVS-Studio).
This commit is contained in:
parent
a14c4f92f3
commit
721c502db9
|
@ -721,6 +721,9 @@ static BOOL CALLBACK ff_effects_callback(const DIEFFECTINFOW *pdei, void *pvRef)
|
|||
DWORD axes[2] = {DIJOFS_X, DIJOFS_Y};
|
||||
int direction[2] = {0, 0};
|
||||
struct Joystick *joystick = pvRef;
|
||||
DIRAMPFORCE rforce;
|
||||
DICONSTANTFORCE cforce;
|
||||
DIPERIODIC pforce;
|
||||
|
||||
if (joystick->effects == NULL)
|
||||
{
|
||||
|
@ -744,8 +747,6 @@ static BOOL CALLBACK ff_effects_callback(const DIEFFECTINFOW *pdei, void *pvRef)
|
|||
|
||||
if (IsEqualGUID(&pdei->guid, &GUID_RampForce))
|
||||
{
|
||||
DIRAMPFORCE rforce;
|
||||
|
||||
rforce.lStart = 0;
|
||||
rforce.lEnd = DI_FFNOMINALMAX;
|
||||
|
||||
|
@ -755,8 +756,6 @@ static BOOL CALLBACK ff_effects_callback(const DIEFFECTINFOW *pdei, void *pvRef)
|
|||
}
|
||||
else if (IsEqualGUID(&pdei->guid, &GUID_ConstantForce))
|
||||
{
|
||||
DICONSTANTFORCE cforce;
|
||||
|
||||
cforce.lMagnitude = DI_FFNOMINALMAX;
|
||||
|
||||
dieffect.cbTypeSpecificParams = sizeof(cforce);
|
||||
|
@ -769,8 +768,6 @@ static BOOL CALLBACK ff_effects_callback(const DIEFFECTINFOW *pdei, void *pvRef)
|
|||
IsEqualGUID(&pdei->guid, &GUID_SawtoothUp) ||
|
||||
IsEqualGUID(&pdei->guid, &GUID_SawtoothDown))
|
||||
{
|
||||
DIPERIODIC pforce;
|
||||
|
||||
pforce.dwMagnitude = DI_FFNOMINALMAX;
|
||||
pforce.lOffset = 0;
|
||||
pforce.dwPhase = 0;
|
||||
|
|
Loading…
Reference in a new issue