emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration o


From: Alan Third
Subject: Re: Emacs 28 on OSX: emacsclient.c:1415: warning: implicit declaration of function 'openat'
Date: Tue, 19 Apr 2022 05:19:10 +0100

On Tue, Apr 19, 2022 at 10:35:38AM +0800, Po Lu wrote:
> Keith David Bershatsky <esq@lawlist.com> writes:
> 
> > I located just one instance of 1060 and changed it to 1068 per your
> > suggestion.  The build generated one warning during the nsterm.m
> > section, and then moved on to nsfns.m, where the build stopped.
> 
> I think you meant nsmenu.m.
> 
> >   CC       nsmenu.o
> > In file included from nsmenu.m:28:
> > lisp.h:2156: warning: declaration does not declare anything
> > nsmenu.m: In function '-[EmacsMenu fillWithWidgetValue:]':
> > nsmenu.m:652: error: stray '@' in program
> > nsmenu.m:652: error: field name not in record or union initializer
> > nsmenu.m:652: error: (near initialization for 'font_attribs')
> > nsmenu.m:652: warning: incompatible Objective-C types initializing 'struct 
> > NSFont *', expected 'struct NSDictionary *'
> 
> I don't know what "@" means in Objective-C, and it seems that GCC
> doesn't support such a feature.  Would someone please explain this piece
> of code?
> 
>   NSDictionary *font_attribs = @{NSFontAttributeName: menuFont};

Welcome to the wonderful world of Objective C under GCC.

The attached should fix this particular error.

These problems will need to be fixed in the emacs-28 branch, assuming
we're going to continue supporting macOS 10.6.

FWIW, I've moved away from trying to hide warnings generated on older
versions of macOS to try and avoid the difficult to understand #if
constructions we've previously used throughout the code.
-- 
Alan Third

Attachment: 0001-Fix-nsmenu-compilation-under-macOS-10.6.patch
Description: Text Data


reply via email to

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