Fix NS warnings.
* nsmenu.m (ns_popup_dialog) * nsimage.m (initFromXBM:width:height:fg:bg:) * nsfns.m (Fx_create_frame): Remove unused variables. (Fns_read_file_name): Initialize fname, remove ret. * nsterm.m (ns_draw_window_cursor): Handle DEFAULT_CURSOR in switch. (ns_get_color, ns_set_horizontal_scroll_bar, keyDown): Remove unused variable. (init): Add parantesis in if. (ns_create_terminal): Assign set_horizontal_scroll_bar_hook.
This commit is contained in:
parent
d02ce2c432
commit
b00168e833
4 changed files with 9 additions and 30 deletions
13
src/nsfns.m
13
src/nsfns.m
|
@ -1075,7 +1075,6 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
Lisp_Object name;
|
||||
int minibuffer_only = 0;
|
||||
long window_prompting = 0;
|
||||
int width, height;
|
||||
ptrdiff_t count = specpdl_ptr - specpdl;
|
||||
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
|
||||
Lisp_Object display;
|
||||
|
@ -1475,10 +1474,9 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
Lisp_Object init, Lisp_Object dir_only_p)
|
||||
{
|
||||
static id fileDelegate = nil;
|
||||
BOOL ret;
|
||||
BOOL isSave = NILP (mustmatch) && NILP (dir_only_p);
|
||||
id panel;
|
||||
Lisp_Object fname;
|
||||
Lisp_Object fname = Qnil;
|
||||
|
||||
NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil :
|
||||
[NSString stringWithUTF8String: SSDATA (prompt)];
|
||||
|
@ -1558,20 +1556,17 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
|
|||
while (ns_fd_data.panel != nil)
|
||||
[NSApp run];
|
||||
|
||||
ret = (ns_fd_data.ret == MODAL_OK_RESPONSE);
|
||||
|
||||
if (ret)
|
||||
if (ns_fd_data.ret == MODAL_OK_RESPONSE)
|
||||
{
|
||||
NSString *str = ns_filename_from_panel (panel);
|
||||
if (! str) str = ns_directory_from_panel (panel);
|
||||
if (! str) ret = NO;
|
||||
else fname = build_string ([str UTF8String]);
|
||||
if (str) fname = build_string ([str UTF8String]);
|
||||
}
|
||||
|
||||
[[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
|
||||
unblock_input ();
|
||||
|
||||
return ret ? fname : Qnil;
|
||||
return fname;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
@ -211,7 +211,6 @@ - (void)dealloc
|
|||
- initFromXBM: (unsigned char *)bits width: (int)w height: (int)h
|
||||
fg: (unsigned long)fg bg: (unsigned long)bg
|
||||
{
|
||||
int bpr = (w + 7) / 8;
|
||||
unsigned char *planes[5];
|
||||
|
||||
[self initWithSize: NSMakeSize (w, h)];
|
||||
|
|
|
@ -1418,7 +1418,7 @@ - (NSRect) frame
|
|||
ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
|
||||
{
|
||||
id dialog;
|
||||
Lisp_Object window, tem, title;
|
||||
Lisp_Object tem, title;
|
||||
NSPoint p;
|
||||
BOOL isQ;
|
||||
NSAutoreleasePool *pool;
|
||||
|
|
23
src/nsterm.m
23
src/nsterm.m
|
@ -1538,7 +1538,7 @@ Free a pool and temporary objects it refers to (callable from C)
|
|||
{
|
||||
NSColor *new = nil;
|
||||
static char hex[20];
|
||||
int scaling;
|
||||
int scaling = 0;
|
||||
float r = -1.0, g, b;
|
||||
NSString *nsname = [NSString stringWithUTF8String: name];
|
||||
|
||||
|
@ -2465,6 +2465,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
|
|||
|
||||
switch (cursor_type)
|
||||
{
|
||||
case DEFAULT_CURSOR:
|
||||
case NO_CURSOR:
|
||||
break;
|
||||
case FILLED_BOX_CURSOR:
|
||||
|
@ -3963,7 +3964,6 @@ in certain situations (rapid incoming events).
|
|||
EmacsScroller *bar;
|
||||
int top, height, left, width;
|
||||
int window_x, window_width;
|
||||
int pixel_width = WINDOW_PIXEL_WIDTH (window);
|
||||
BOOL update_p = YES;
|
||||
|
||||
/* optimization; display engine sends WAY too many of these.. */
|
||||
|
@ -4321,6 +4321,7 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
|
|||
terminal->menu_show_hook = ns_menu_show;
|
||||
terminal->popup_dialog_hook = ns_popup_dialog;
|
||||
terminal->set_vertical_scroll_bar_hook = ns_set_vertical_scroll_bar;
|
||||
terminal->set_horizontal_scroll_bar_hook = ns_set_horizontal_scroll_bar;
|
||||
terminal->condemn_scroll_bars_hook = ns_condemn_scroll_bars;
|
||||
terminal->redeem_scroll_bar_hook = ns_redeem_scroll_bar;
|
||||
terminal->judge_scroll_bars_hook = ns_judge_scroll_bars;
|
||||
|
@ -4605,7 +4606,7 @@ @implementation EmacsApp
|
|||
|
||||
- (id)init
|
||||
{
|
||||
if (self = [super init])
|
||||
if ((self = [super init]))
|
||||
{
|
||||
#ifdef NS_IMPL_COCOA
|
||||
self->isFirst = YES;
|
||||
|
@ -5272,9 +5273,6 @@ - (void)keyDown: (NSEvent *)theEvent
|
|||
int code;
|
||||
unsigned fnKeysym = 0;
|
||||
static NSMutableArray *nsEvArray;
|
||||
#ifdef NS_IMPL_GNUSTEP
|
||||
static BOOL firstTime = YES;
|
||||
#endif
|
||||
int left_is_none;
|
||||
unsigned int flags = [theEvent modifierFlags];
|
||||
|
||||
|
@ -5503,18 +5501,6 @@ flag set (this is probably a bug in the OS).
|
|||
}
|
||||
|
||||
|
||||
#ifdef NS_IMPL_GNUSTEP
|
||||
/* if we get here we should send the key for input manager processing */
|
||||
/* Disable warning, there is nothing a user can do about it anyway, and
|
||||
it does not seem to matter. */
|
||||
#if 0
|
||||
if (firstTime && [[NSInputManager currentInputManager]
|
||||
wantsToDelayTextChangeNotifications] == NO)
|
||||
fprintf (stderr,
|
||||
"Emacs: WARNING: TextInput mgr wants marked text to be permanent!\n");
|
||||
#endif
|
||||
firstTime = NO;
|
||||
#endif
|
||||
if (NS_KEYLOG && !processingCompose)
|
||||
fprintf (stderr, "keyDown: Begin compose sequence.\n");
|
||||
|
||||
|
@ -7202,7 +7188,6 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
|
|||
one screen, we want to constrain. Other times not. */
|
||||
NSArray *screens = [NSScreen screens];
|
||||
NSUInteger nr_screens = [screens count], nr_eff_screens = 0, i;
|
||||
struct frame *f = ((EmacsView *)[self delegate])->emacsframe;
|
||||
NSTRACE (constrainFrameRect);
|
||||
NSTRACE_RECT ("input", frameRect);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue