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

compilation warnings in _macosx.m #1013

Closed
efiring opened this issue Jul 15, 2012 · 4 comments
Closed

compilation warnings in _macosx.m #1013

efiring opened this issue Jul 15, 2012 · 4 comments

Comments

@efiring
Copy link
Member

efiring commented Jul 15, 2012

Compiling _macosx.m on Lion gives 3 warnings:

running build_ext
gcc-4.2 not found, using clang instead
building 'matplotlib.backends._macosx' extension
clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I/usr/X11/include -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/_macosx.m -o build/temp.macosx-10.6-intel-2.7/src/_macosx.o
src/_macosx.m:3808:26: warning: sending 'View *' to parameter of incompatible type
      'id'
    [window setDelegate: view];
                         ^~~~
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:308:44: note: passing
      argument to parameter 'anObject' here
- (void)setDelegate:(id )anObject;
                                           ^
src/_macosx.m:4253:20: warning: incompatible pointer types assigning to
      'ScrollableButton *' from 'NSButton *' [-Wincompatible-pointer-types]
            button = [NSButton alloc];
                   ^ ~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:1: note: class
      method 'alloc' is assumed to return an instance of its receiver type ('NSButton *')
+ (id)alloc;
^
src/_macosx.m:4932:31: warning: 'filename' is deprecated [-Wdeprecated-declarations]
        NSString* filename = [panel filename];
                              ^
3 warnings generated.

Although these may be harmless, it would be nicer if they could be avoided entirely.

@pmarshwx
Copy link

Hi, Eric,

I'm relatively new here, but when I just went and compiled MPL just now I didn't have any errors on OS X Lion using clang. Granted, I'm not sure if you have more robust error checking turned on than I, but thought I'd offer my experience.

@efiring
Copy link
Member Author

efiring commented Jul 16, 2012

Patrick,

All I did was "python setup.py build; python setup.py install", so no extra flags. This is with python.org 2.7.3 and XCode 4.3.3. What XCode version do you have?

Eric

@pmarshwx
Copy link

That's what I did as well, although technically I did use the --user flag. I'm using the version of python 2.7.3 built by homebrew and XCode Version 4.3.3 (4E3002). The clang compiler version

$ clang --version
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix

@mdehoon
Copy link
Contributor

mdehoon commented Jul 22, 2012

With Mac OS X 10.7 I was still seeing these compiler warnings.
This pull request fixes them:

#1034

@efiring efiring closed this as completed Jul 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants