Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

compilation warnings in _macosx.m #1013

Closed
efiring opened this Issue · 4 comments

3 participants

@efiring
Owner

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

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
Owner

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

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

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

#1034

@efiring efiring closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.