Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
20f9040b
Commit
20f9040b
authored
Feb 11, 2014
by
Don Gagne
Browse files
Fix possible ununitialized but used variables
parent
017e564a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/comm/MAVLinkSimulationLink.cc
View file @
20f9040b
...
...
@@ -677,6 +677,9 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size)
int
streampointer
=
0
;
uint8_t
buffer
[
MAVLINK_MAX_PACKET_LEN
];
int
bufferlength
=
0
;
// Initialize drop count to 0 so it isn't referenced uninitialized when returned at the bottom of this function
comm
.
packet_rx_drop_count
=
0
;
// Output all bytes as hex digits
for
(
int
i
=
0
;
i
<
size
;
i
++
)
...
...
src/ui/configuration/FlightModeConfig.cc
View file @
20f9040b
...
...
@@ -222,7 +222,7 @@ void FlightModeConfig::remoteControlChannelRawChanged(int chan, float val)
if
(
chan
==
_modeSwitchRCChannel
)
{
qDebug
()
<<
chan
<<
val
;
size_t
highlightIndex
;
size_t
highlightIndex
=
_cModes
;
// initialize to unreachable index
for
(
size_t
i
=
0
;
i
<
_cModes
;
i
++
)
{
if
(
val
<
_rgModePWMBoundary
[
i
])
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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