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

Resolved the cppcheck style warnings #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gunterkoenigsmann
Copy link

cppcheck is a popular tool that performs static code analysis outputting warnings if constructs are error-prone or do not make sense. In the project wxMaxima some of these warnings have proven to be extremely useful . Getting rid of any warnings that can be fixed makes things easier for users who want cppcheck to find bugs in their code.

This commit resolves the following warnings:

  nanosvg.h:829: style: Variable 'data' is reassigned a value before the old one has been used.
  nanosvg.h:2907: style: Variable 'fp' is reassigned a value before the old one has been used.

The cause of these warnings is that both variables are set to NULL and then assigned a different value to - which is no bug but adds an unnecessary assignment to the code.

cppcheck is a popular tool that performs static code analysis
outputting warnings if constructs are error-prone or do not make
sense. Currently nanosvg produces many warnings, though, making
spotting real errors in a project harder than necessary.

This commit resolves the following warings:

  nanosvg.h:829: style: Variable 'data' is reassigned a value before the old one has been used.
  nanosvg.h:2907: style: Variable 'fp' is reassigned a value before the old one has been used.

The cause of these warnings is that both variables are set to
NULL and then assigned a different value to - which is no bug
but adds an unnecessary assignment to the code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant