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

Remove xml warning #69

Merged
merged 3 commits into from
Mar 2, 2017
Merged

Remove xml warning #69

merged 3 commits into from
Mar 2, 2017

Conversation

mikaelarguedas
Copy link
Contributor

@mikaelarguedas mikaelarguedas commented Feb 28, 2017

This PR uses xml version 2 for cppcheck output.

Rationale:
cppcheck deprecated usage of version 1 in the last releases, and will completely drop support in v1.81.
We started to see deprecation warnings show on Mac and Windows CIs (cppcheck: XML format version 1 is deprecated and will be removed in cppcheck 1.81. Use '--xml-version=2') e.g. http://ci.ros2.org/view/nightly/job/nightly_osx_debug/373

Tested with a few errors for either same or different kind and the generated xunit file is identical as with version 1.
Errors tested:

void f(char *p) {
    if (p+1){}
}

bool using_introspection_c_typesupport(const char * typesupport_identifier)
{
  double * a = reinterpret_cast<double *>(malloc(10 * sizeof(double)));
  (void)a;
  return true;
}

@mikaelarguedas mikaelarguedas self-assigned this Feb 28, 2017
for error in root.findall('error'):
filename = error.get('file')
errors = root.find('errors')
for error in errors:
Copy link
Contributor

Choose a reason for hiding this comment

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

Since errors is only used once this could stay in one line as before: for error in root.find('errors'):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in c279be1

@mikaelarguedas mikaelarguedas added the in review Waiting for review (Kanban column) label Feb 28, 2017
@mikaelarguedas mikaelarguedas merged commit 16cb042 into master Mar 2, 2017
@mikaelarguedas mikaelarguedas deleted the remove_xml_warning branch March 2, 2017 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants