summaryrefslogtreecommitdiff
path: root/src/nsselect.m
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-07-07 12:23:41 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-07-07 12:23:41 -0700
commit6045c4fdb88ee6bd84afcaac4a0b7e8a96f23050 (patch)
tree86959a892e16b2947b794a6ad993f0090387fab3 /src/nsselect.m
parent41f9404e0cb421fcea07538bbd686d54200ed92d (diff)
downloademacs-6045c4fdb88ee6bd84afcaac4a0b7e8a96f23050.tar.gz
Improve static checking when configured --with-ns.
See Samuel Bronson's remarks in <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00146.html>. * configure.in (WARN_CFLAGS): Omit -Wunreachable-code, as it's a no-op with recent GCC and harmful in earlier ones. Omit -Wsync-nand, as it's irrelevant to Emacs and provokes a warning when compiling with ObjC. Always omit -Wunsafe-loop-optimizations, as we don't mind when optimization is being done correctly. Fix some minor --with-ns problems found by static checking. * src/frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]: (x_set_font) [!HAVE_X_WINDOWS]: * src/image.c (xpm_load_image) [HAVE_NS]: (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]: (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]: Remove unused local. (Fx_parse_geometry) [HAVE_NS]: Don't return garbage. (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label. * src/image.c (x_create_bitmap_from_file) [HAVE_NS]: (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]: * src/nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal): * src/xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]: Fix pointer signedness problem. * src/xfaces.c (FRAME_X_FONT_TABLE): * src/xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
Diffstat (limited to 'src/nsselect.m')
-rw-r--r--src/nsselect.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nsselect.m b/src/nsselect.m
index 6352d882b7a..a4d91dae1f2 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -62,7 +62,7 @@ symbol_to_nsstring (Lisp_Object sym)
if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
if (EQ (sym, QTEXT)) return NSStringPboardType;
- return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
+ return [NSString stringWithUTF8String: SSDATA (XSYMBOL (sym)->xname)];
}
static NSPasteboard *
@@ -157,7 +157,7 @@ ns_string_to_pasteboard_internal (id pb, Lisp_Object str, NSString *gtype)
CHECK_STRING (str);
- utfStr = SDATA (str);
+ utfStr = SSDATA (str);
nsStr = [[NSString alloc] initWithBytesNoCopy: utfStr
length: SBYTES (str)
encoding: NSUTF8StringEncoding
@@ -388,7 +388,7 @@ On Nextstep, FRAME is unused. */)
for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
call3 (Fcar (rest), selection, target_symbol, successful_p);
}
-
+
return value;
}
@@ -443,7 +443,7 @@ On Nextstep, TERMINAL is unused. */)
if (EQ (selection, Qt)) selection = QSECONDARY;
pb = ns_symbol_to_pb (selection);
if (pb == nil) return Qnil;
-
+
types = [pb types];
return ([types count] == 0) ? Qnil : Qt;
}