Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverity fixes - initializations_1 #1462

Merged
merged 7 commits into from
Dec 4, 2017

Conversation

damn1
Copy link
Contributor

@damn1 damn1 commented Nov 22, 2017

Fixes some 'uninitialized pointer or scalar field' issues raised by Coverity.
Affect components

  • carriers
  • devices

@damn1 damn1 changed the title Coverity fixes - initializations Coverity fixes - initializations_1 Nov 22, 2017
barbalberto
barbalberto previously approved these changes Nov 22, 2017
Copy link
Collaborator

@barbalberto barbalberto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@damn1 damn1 changed the title Coverity fixes - initializations_1 [WIP] Coverity fixes - initializations_1 Nov 22, 2017
@damn1
Copy link
Contributor Author

damn1 commented Nov 22, 2017

I'll have to fix this PR given this MVSC feature:
https://msdn.microsoft.com/en-us/library/dn793970.aspx

@damn1 damn1 force-pushed the coverityFix_uninit1 branch from 684c15b to 11fcc2a Compare November 23, 2017 08:44
@damn1 damn1 changed the title [WIP] Coverity fixes - initializations_1 Coverity fixes - initializations_1 Nov 23, 2017
@robotology robotology deleted a comment Nov 23, 2017
@Nicogene Nicogene added PR Status: Changelog - Not Required This PR does not need a changelog entry Component: Carriers Component: Devices Type: Cleanup Involves cleaning up some part of YARP labels Nov 24, 2017
@damn1 damn1 force-pushed the coverityFix_uninit1 branch from 11fcc2a to a664d94 Compare November 24, 2017 16:25
@robotology robotology deleted a comment Nov 24, 2017
@@ -12,6 +12,7 @@

#include <csetjmp>
#include <cstdio>
#include <string.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use cstring instead of string.h

Copy link
Contributor Author

@damn1 damn1 Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done bdb81ae

@@ -10,6 +10,7 @@
#include <cstdio>
#include <cstdlib>
#include <portaudio.h>
#include <string.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 67ad260

m_do_not_clip_infinity_enable(false),
m_inExpressMode(false),
m_pwm_val(0),
m_device_status(DEVICE_OK_STANBY),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not check this, but "STANBY" looks like a typo...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the actual name of the status

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened issue #1469

@damn1 damn1 force-pushed the coverityFix_uninit1 branch from a664d94 to 67e2fe4 Compare November 27, 2017 08:53
@robotology robotology deleted a comment Nov 27, 2017
@drdanz drdanz force-pushed the coverityFix_uninit1 branch from 67e2fe4 to c0982d6 Compare December 4, 2017 08:55
@drdanz drdanz merged commit a9204b8 into robotology:master Dec 4, 2017
@robotology robotology deleted a comment Dec 4, 2017
@damn1 damn1 deleted the coverityFix_uninit1 branch December 4, 2017 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants