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

undef symbols to avoid warning #50

Merged
merged 1 commit into from
Dec 9, 2015
Merged

Conversation

gerkey
Copy link
Contributor

@gerkey gerkey commented Dec 9, 2015

undef symbols before defining them to avoid preprocessor warnings in the case that they were already defined.

I'm currently only getting only getting a warning on one symbol:

/home/gerkey/code/rospack-caching/src/rospack/src/rospack.cpp:78:0: warning: "PyUnicode_FromString" redefined [enabled by default]
 #define PyUnicode_FromString PyString_FromString
 ^
In file included from /usr/include/python2.7/Python.h:85:0,
                 from /home/gerkey/code/rospack-caching/src/rospack/src/rospack.cpp:72:
/usr/include/python2.7/unicodeobject.h:281:0: note: this is the location of the previous definition
 # define PyUnicode_FromString PyUnicodeUCS4_FromString
 ^

but we might as well undef them all.

@dirk-thomas
Copy link
Member

+1

gerkey added a commit that referenced this pull request Dec 9, 2015
@gerkey gerkey merged commit 7a86579 into indigo-devel Dec 9, 2015
@gerkey gerkey deleted the avoid_redefine_warning branch December 9, 2015 18:38
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