all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] [NS] Fix compilation with clang on OSX
@ 2010-11-04 16:15 İsmail Dönmez
  2010-11-04 17:52 ` David Reitter
  2010-11-04 18:11 ` Adrian Robert
  0 siblings, 2 replies; 6+ messages in thread
From: İsmail Dönmez @ 2010-11-04 16:15 UTC (permalink / raw)
  To: emacs-devel


[-- 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-05  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04 16:15 [PATCH] [NS] Fix compilation with clang on OSX İsmail Dönmez
2010-11-04 17:52 ` 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

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.