Skip to content

Fix compiler warning - #3781

Merged
tacaswell merged 1 commit into
matplotlib:masterfrom
mdboom:compiler-warning
Nov 11, 2014
Merged

tacaswell merged 1 commit into
matplotlib:masterfrom
mdboom:compiler-warning

Conversation

@mdboom

@mdboom mdboom commented Nov 11, 2014

Copy link
Copy Markdown
Member

Fixes a compiler warning about uninitialized values that looks like it's coming from Agg, but which is actually matplotlib's fault ;)

@mdboom mdboom added this to the v1.5.x milestone Nov 11, 2014
@mdboom mdboom self-assigned this Nov 11, 2014
Comment thread src/py_adaptors.h

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Setting the last vertex to 0 was the source of those 3D polygon bugs, is something similar going to come up here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think so. When the code returned is agg::path_cmd_stop, the x and y values are actually meaningless and should be ignored by the caller. This fix is only to silence a compiler warning that it is theoretically possible to get a vertex where the x y values were never set (if it were a 0-length path), since the compiler doesn't understand the semantics of the vertex codes.

tacaswell added a commit that referenced this pull request Nov 11, 2014
@tacaswell
tacaswell merged commit 2d3b0aa into matplotlib:master Nov 11, 2014
@tacaswell

Copy link
Copy Markdown
Member

I don't think this is worth back-porting to 1.4.x

@mdboom
mdboom deleted the compiler-warning branch March 3, 2015 18:43
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.

2 participants