Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
721c502d
Commit
721c502d
authored
Dec 04, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
joy.cpl: Avoid pointers to out of scope variables (PVS-Studio).
parent
a14c4f92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
main.c
dlls/joy.cpl/main.c
+3
-6
No files found.
dlls/joy.cpl/main.c
View file @
721c502d
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment