Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Fix -Wundef warnings #15

Merged
merged 3 commits into from Feb 27, 2015
Merged

Conversation

timonus
Copy link
Contributor

@timonus timonus commented Feb 24, 2015

Vanilla iOS projects define DEBUG to be 1 in the Debug build configuration, and don't define DEBUG at all in the Release build configuration. That means that if you make a release build DEBUG is implicitly 0, but if you turn on the -Wundef warning flag you'll get warnings about this implicit value.

screen shot 2015-02-24 at 11 26 56 am

This pull request explicitly makes sure both that DEBUG is defined and that its value evaluates to true. It also fixes another warning related to using an iOS-only macro in the Mac project.

This mirrors a change I made to our FLAnimatedImage project at Flipboard/FLAnimatedImage#66.

Tim Johnsen added 3 commits February 24, 2015 12:36
Vanilla iOS projects define DEBUG to be 1 in the Debug build configuration, and don't define DEBUG at all in the Release build configuration. That means that if you make a release build DEBUG is implicitly 0, but if you turn on the -Wundef warning flag you'll get warnings about this implicit value. This change explicitly makes sure both that DEBUG is defined and that its value evaluates to true.
Was causing a warning with the -Wundef flag turned on when building the Mac project.
@timonus
Copy link
Contributor Author

timonus commented Feb 27, 2015

@maicki would love to get this merged, the Pocket SDK is causing warnings in our codebase without it.

maicki added a commit that referenced this pull request Feb 27, 2015
Fix -Wundef warnings. Thanks for that!
@maicki maicki merged commit 47ffff5 into Pocket:master Feb 27, 2015
@timonus
Copy link
Contributor Author

timonus commented Feb 27, 2015

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants