Skip to content

compilation warnings in _macosx.m #1013

Closed
@efiring

Description

@efiring

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions