summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.in2
-rw-r--r--src/emacs.c7
-rw-r--r--src/image.c2
-rw-r--r--src/nsterm.m20
4 files changed, 22 insertions, 9 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 83210b1317a..04fabd5f424 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -379,7 +379,7 @@ pdmp :=
endif
# Flags that might be in WARN_CFLAGS but are not valid for Objective C.
-NON_OBJC_CFLAGS = -Wignored-attributes -Wignored-qualifiers -Wopenmp-simd
+NON_OBJC_CFLAGS = -Wignored-attributes -Wignored-qualifiers -Wopenmp-simd -Wnested-externs
# Ditto, but for C++.
NON_CXX_CFLAGS = -Wmissing-prototypes -Wnested-externs -Wold-style-definition \
-Wstrict-prototypes -Wno-override-init
diff --git a/src/emacs.c b/src/emacs.c
index 3b708db7796..f6e2c01ee74 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -875,9 +875,14 @@ load_pdump (int argc, char **argv)
}
/* Where's our executable? */
- ptrdiff_t bufsize, exec_bufsize;
+ ptrdiff_t bufsize;
+#ifndef NS_SELF_CONTAINED
+ ptrdiff_t exec_bufsize;
+#endif
emacs_executable = load_pdump_find_executable (argv[0], &bufsize);
+#ifndef NS_SELF_CONTAINED
exec_bufsize = bufsize;
+#endif
/* If we couldn't find our executable, go straight to looking for
the dump in the hardcoded location. */
diff --git a/src/image.c b/src/image.c
index 439348759fd..e7d347b7820 100644
--- a/src/image.c
+++ b/src/image.c
@@ -82,7 +82,9 @@ typedef struct x_bitmap_record Bitmap_Record;
#if defined(USE_CAIRO) || defined(HAVE_NS)
#define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b))
+#ifndef HAVE_NS
#define ARGB_TO_ULONG(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
+#endif
#define RED_FROM_ULONG(color) (((color) >> 16) & 0xff)
#define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff)
#define BLUE_FROM_ULONG(color) ((color) & 0xff)
diff --git a/src/nsterm.m b/src/nsterm.m
index 382aa57a125..428d1a2fe22 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1617,10 +1617,17 @@ ns_destroy_window (struct frame *f)
/* If this frame has a parent window, detach it as not doing so can
cause a crash in GNUStep. */
- if (FRAME_PARENT_FRAME (f) != NULL)
+ if (FRAME_PARENT_FRAME (f))
{
NSWindow *child = [FRAME_NS_VIEW (f) window];
- NSWindow *parent = [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window];
+ NSWindow *parent;
+
+ /* Pacify a incorrect GCC warning about FRAME_PARENT_FRAME (f)
+ being NULL. */
+ if (FRAME_PARENT_FRAME (f))
+ parent = [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window];
+ else
+ emacs_abort ();
[parent removeChildWindow: child];
}
@@ -2086,8 +2093,8 @@ ns_lisp_to_color (Lisp_Object color, NSColor **col)
return 1;
}
-void
-ns_query_color(void *col, Emacs_Color *color_def)
+static void
+ns_query_color (void *col, Emacs_Color *color_def)
/* --------------------------------------------------------------------------
Get ARGB values out of NSColor col and put them into color_def
and set color_def pixel to the ARGB color.
@@ -4481,7 +4488,7 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
#ifdef HAVE_PTHREAD
void
-ns_run_loop_break ()
+ns_run_loop_break (void)
/* Break out of the NS run loop in ns_select or ns_read_socket. */
{
NSTRACE_WHEN (NSTRACE_GROUP_EVENTS, "ns_run_loop_break");
@@ -7565,7 +7572,7 @@ not_in_argv (NSString *arg)
EmacsWindow *w, *fw;
BOOL onFirstScreen;
struct frame *f;
- NSRect r, wr;
+ NSRect r;
NSColor *col;
NSTRACE ("[EmacsView toggleFullScreen:]");
@@ -7584,7 +7591,6 @@ not_in_argv (NSString *arg)
w = (EmacsWindow *)[self window];
onFirstScreen = [[w screen] isEqual:[[NSScreen screens] objectAtIndex:0]];
f = emacsframe;
- wr = [w frame];
col = [NSColor colorWithUnsignedLong:NS_FACE_BACKGROUND
(FACE_FROM_ID (f, DEFAULT_FACE_ID))];