all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
To: Carsten Mattner <carstenmattner@googlemail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: nsterm.m warnings
Date: Thu, 05 Jan 2012 08:31:05 +0100	[thread overview]
Message-ID: <4F0551B9.5080305@swipnet.se> (raw)
In-Reply-To: <CACY+HvpKUvt=q84jJ_wb6KKcg0WOGvrvUvh3gwZaMcoajLtV3g@mail.gmail.com>

Carsten Mattner skrev 2012-01-05 00:49:
> On Wed, Jan 4, 2012 at 8:57 PM, Jan Djärv<jan.h.d@swipnet.se>  wrote:
>>
>> 4 jan 2012 kl. 18:53 skrev Carsten Mattner:
>>
>>> I think at least one of the following or ideally both should be fixed.
>>>
>>> nsterm.m: In function ‘-[EmacsView conversationIdentifier]’:
>>> nsterm.m:5053: warning: conflicting types for ‘-(long
>>> int)conversationIdentifier’
>>> /System/Library/Frameworks/AppKit.framework/Headers/NSInputManager.h:25:
>>> warning: previous declaration of ‘-(NSInteger)conversationIdentifier’
>>
>> What do you mean by "both"?  This is only one warning.
>
> It's the same cause, but two warning messages.
> You could logically group them to one, yes.

I see it as one warning message.  There are two "warning:" in there, but 
they only make sense together.

>
>> It has no practical importance, and only occurs if you build a 32-bit
>> executable, which is rare on OSX.
>
> If it's safe to ignore in a 32-bit build, ok.
> Strictly speaking the code is incorrect, isn't it?

The code relies on the fact that the compiler can convert a long to an 
int on a 32-bit build.  In principle such a conversion can truncate the 
value.  But in this case it does not matter, as long as the value is 
unique within the application (Emacs).  As the build is 32-bit, the 
pointer converted to long is 32-bit to start with.  That long is then 
converted to an int, so there is no truncation.

But it is bad style to change interfaces like this, I'll fix it shortly. 
  I guess it was long at some point in time, and then got changed to 
NSInteger.

	Jan D.





  reply	other threads:[~2012-01-05  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 17:53 nsterm.m warnings Carsten Mattner
2012-01-04 19:57 ` Jan Djärv
2012-01-04 23:49   ` Carsten Mattner
2012-01-05  7:31     ` Jan D. [this message]
2012-01-05 11:21       ` Carsten Mattner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F0551B9.5080305@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=carstenmattner@googlemail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.