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

bound.next_edge: Not initialized before first call #69

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

DiabloRusso
Copy link
Contributor

bound.hpp: Add next_edge initialization
snap_rounding.hpp: In insert_local_minima_into_ABL_hot_pixel with
current_edge also initialized next_edge

bound.hpp: Add next_edge initialization
snap_rounding.hpp: In insert_local_minima_into_ABL_hot_pixel with
current_edge also initialized next_edge
@springmeyer
Copy link
Contributor

@DiabloRusso thank you for finding this. This helped me realized that I'd be wrongly assuming for quite some time now that the -Weffc++ flag in clang++ would catch this problem. I've run that locally with wagyu and clang++ (via -Weverything) but did not see any uninitialized members. Turns out that -Weffc++ catches this problem with g++ but not clang++ because clang++'s warning just maps to -Wnon-virtual-dtor (https://clang.llvm.org/docs/DiagnosticsReference.html#weffc).

But I pushed a test branch enabling it on travis, where we do test with g++, and sure enough this bug is caught (since we turn warnings into errors): https://travis-ci.org/mapbox/wagyu/jobs/202717641#L348

@springmeyer
Copy link
Contributor

Rebased against master, the -Weffc++ builds now pass: https://travis-ci.org/mapbox/wagyu/builds/202725387. So it looks like @DiabloRusso uncovered the only spot this was happening.

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.

3 participants