diff options
| author | Paul Eggert | 2012-07-07 12:23:41 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-07 12:23:41 -0700 |
| commit | 6045c4fdb88ee6bd84afcaac4a0b7e8a96f23050 (patch) | |
| tree | 86959a892e16b2947b794a6ad993f0090387fab3 /src/xfaces.c | |
| parent | 41f9404e0cb421fcea07538bbd686d54200ed92d (diff) | |
| download | emacs-6045c4fdb88ee6bd84afcaac4a0b7e8a96f23050.tar.gz emacs-6045c4fdb88ee6bd84afcaac4a0b7e8a96f23050.zip | |
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/xfaces.c')
| -rw-r--r-- | src/xfaces.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index bc42cb4312a..a6b260a2929 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -233,7 +233,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 233 | #undef FRAME_X_DISPLAY_INFO | 233 | #undef FRAME_X_DISPLAY_INFO |
| 234 | #define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO | 234 | #define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO |
| 235 | #define x_display_info w32_display_info | 235 | #define x_display_info w32_display_info |
| 236 | #define FRAME_X_FONT_TABLE FRAME_W32_FONT_TABLE | ||
| 237 | #define check_x check_w32 | 236 | #define check_x check_w32 |
| 238 | #define GCGraphicsExposures 0 | 237 | #define GCGraphicsExposures 0 |
| 239 | #endif /* WINDOWSNT */ | 238 | #endif /* WINDOWSNT */ |
| @@ -243,7 +242,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 243 | #undef FRAME_X_DISPLAY_INFO | 242 | #undef FRAME_X_DISPLAY_INFO |
| 244 | #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO | 243 | #define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO |
| 245 | #define x_display_info ns_display_info | 244 | #define x_display_info ns_display_info |
| 246 | #define FRAME_X_FONT_TABLE FRAME_NS_FONT_TABLE | ||
| 247 | #define check_x check_ns | 245 | #define check_x check_ns |
| 248 | #define GCGraphicsExposures 0 | 246 | #define GCGraphicsExposures 0 |
| 249 | #endif /* HAVE_NS */ | 247 | #endif /* HAVE_NS */ |
| @@ -6381,7 +6379,7 @@ where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */) | |||
| 6381 | CHECK_STRING (filename); | 6379 | CHECK_STRING (filename); |
| 6382 | abspath = Fexpand_file_name (filename, Qnil); | 6380 | abspath = Fexpand_file_name (filename, Qnil); |
| 6383 | 6381 | ||
| 6384 | fp = fopen (SDATA (abspath), "rt"); | 6382 | fp = fopen (SSDATA (abspath), "rt"); |
| 6385 | if (fp) | 6383 | if (fp) |
| 6386 | { | 6384 | { |
| 6387 | char buf[512]; | 6385 | char buf[512]; |