From: "İsmail Dönmez" <ismail@namtrac.org>
To: emacs-devel@gnu.org
Subject: [PATCH] [NS] Fix compilation with clang on OSX
Date: Thu, 4 Nov 2010 18:15:51 +0200 [thread overview]
Message-ID: <AANLkTim2gnWuq2mLQmw6uvpHzJ-F=B8iEiAr04_9vkQh@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 136 bytes --]
Hi;
Attached is a patch fixing emacs compilation with clang on OSX. Just some
minor problems.
Please review & apply.
Regards,
ismail
[-- Attachment #1.2: Type: text/html, Size: 790 bytes --]
[-- Attachment #2: 0001-Fix-compilation-problems-with-clang-add-explicit-ret.patch --]
[-- Type: application/octet-stream, Size: 1571 bytes --]
From ccdc0a4851158cf1ed7908569459e221997bd1ab Mon Sep 17 00:00:00 2001
From: Ismail Donmez <ismail@namtrac.org>
Date: Thu, 4 Nov 2010 17:53:49 +0200
Subject: [PATCH] Fix compilation problems with clang, add explicit returns to non-void functions, mark void functions as such
---
src/nsfont.m | 2 +-
src/nsimage.m | 2 +-
src/nsterm.m | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/nsfont.m b/src/nsfont.m
index 1159867..e1450c5 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1280,7 +1280,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
}
CGContextRestoreGState (gcontext);
- return;
+ return 0;
}
#endif /* NS_IMPL_COCOA */
diff --git a/src/nsimage.m b/src/nsimage.m
index a42950d..efaab4b 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -327,7 +327,7 @@ static EmacsImage *ImageList = nil;
/* Set color for a bitmap image (see initFromSkipXBM). Note that the alpha
is used as a mask, so we just memset the entire array. */
-- setXBMColor: (NSColor *)color
+- (void)setXBMColor: (NSColor *)color
{
NSSize s = [self size];
int len = (int) s.width * s.height;
diff --git a/src/nsterm.m b/src/nsterm.m
index f11c477..2fd82a0 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5436,7 +5436,7 @@ ns_term_shutdown (int sig)
NSTRACE (performDragOperation);
if (!emacs_event)
- return;
+ return NO;
position = [self convertPoint: [sender draggingLocation] fromView: nil];
x = lrint (position.x); y = lrint (position.y);
--
1.7.3.2.145.g7ebee
next reply other threads:[~2010-11-04 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-04 16:15 İsmail Dönmez [this message]
2010-11-04 17:52 ` [PATCH] [NS] Fix compilation with clang on OSX David Reitter
2010-11-04 18:00 ` İsmail Dönmez
2010-11-04 18:11 ` Adrian Robert
2010-11-05 0:04 ` Glenn Morris
2010-11-05 8:32 ` Adrian Robert
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTim2gnWuq2mLQmw6uvpHzJ-F=B8iEiAr04_9vkQh@mail.gmail.com' \
--to=ismail@namtrac.org \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).