emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix macOS 12 deprecation notices


From: Bob Halley
Subject: Re: [PATCH] Fix macOS 12 deprecation notices
Date: Sat, 20 Aug 2016 16:15:35 -0700

Yep, that removes most of them.  Here's what's left:

nsterm.m:6941:10: warning: null passed to a callee that requires a non-null 
argument [-Wnonnull]
  [NSApp registerServicesMenuSendTypes: ns_send_types
         ^

For this one (above), my guess is to pass ns_return_types, which the code 
creates but does not seem to use, but again I don't know enough to be sure!

nsterm.m:8475:52: warning: 'context' is deprecated: first deprecated in macOS 
10.12 - This method always returns nil. If you
      need access to the current drawing context, use [NSGraphicsContext 
currentContext] inside of a draw operation.
      [-Wdeprecated-declarations]
                                       context: [e context]

In the code making a "fake event" at nsterm.m:8470, it says that [e context] is 
always nil.  Probably just replacing this with nil is safe, but I don't know 
enough to be sure.  Otherwise I suppose you could just call [e context] on 
older stuff, and say nil on 10.12 and later.
                                                   
nsmenu.m:754:44: warning: 'context' is deprecated: first deprecated in macOS 
10.12 - This method always returns nil. If you
      need access to the current drawing context, use [NSGraphicsContext 
currentContext] inside of a draw operation.
      [-Wdeprecated-declarations]
                               context: [e context]
                                           ^
nsmenu.m:1535:62: warning: 'NSUtilityWindowMask' is deprecated: first 
deprecated in macOS 10.12 [-Wdeprecated-declarations]
  aStyle = 
NSWindowStyleMaskTitled|NSWindowStyleMaskClosable|NSUtilityWindowMask;
                                                             ^~~~~~~~~~~~~~~~~~~
                                                             
NSWindowStyleMaskUtilityWindow
                               ^
nsmenu.m:1506:67: warning: conflicting parameter types in implementation of 
'initWithContentRect:styleMask:backing:defer:':
      'NSWindowStyleMask' (aka 'enum NSWindowStyleMask') vs 'NSUInteger' (aka 
'unsigned long') [-Wmismatched-parameter-types]
- initWithContentRect: (NSRect)contentRect styleMask: (NSUInteger)aStyle
                                                       ~~~~~~~~~~ ^
3 warnings generated.


macfont.m:222:23: warning: implicit conversion from enumeration type 
'CTCharacterCollection' (aka 'enum CTCharacterCollection')
      to different enumeration type 'NSCharacterCollection' (aka 'enum 
NSCharacterCollection') [-Wenum-conversion]
                                       collection:collection
                                                  ^~~~~~~~~~
macfont.m:289:18: warning: 'setUsesScreenFonts:' is deprecated: first 
deprecated in macOS 10.11 [-Wdeprecated-declarations]
  [layoutManager setUsesScreenFonts:YES];
                 ^
macfont.m:344:18: warning: 'setUsesScreenFonts:' is deprecated: first 
deprecated in macOS 10.11 [-Wdeprecated-declarations]
  [layoutManager setUsesScreenFonts:screen_font_p];
                 ^
macfont.m:417:22: warning: 
'getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:'
 is deprecated:
      first deprecated in macOS 10.11 - Use 
-getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels: instead
      [-Wdeprecated-declarations]
      [layoutManager getGlyphsInRange:(NSMakeRange (glyphIndex, 1))
                     ^
4 warnings generated.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]