Fix GNUstep warnings

* src/nsterm.h: EmacsSurface is only required if NS_DRAW_TO_BUFFER is
defined.
* src/nsterm.m (ns_judge_scroll_bars): Remove unused variable.
* src/nsmenu.m (update_frame_tool_bar):
(ns_update_menubar): Remove unused variables.
This commit is contained in:
Alan Third 2020-12-19 20:46:55 +00:00
parent 107978365e
commit 1c5208ba71
3 changed files with 3 additions and 7 deletions

View file

@ -956,15 +956,12 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
int i, k = 0;
EmacsView *view = FRAME_NS_VIEW (f);
EmacsToolbar *toolbar = [view toolbar];
int oldh;
NSTRACE ("update_frame_tool_bar");
if (view == nil || toolbar == nil) return;
block_input ();
oldh = FRAME_TOOLBAR_HEIGHT (f);
#ifdef NS_IMPL_COCOA
[toolbar clearActive];
#else

View file

@ -705,7 +705,7 @@ typedef id instancetype;
+ (CGFloat)scrollerWidth;
@end
#ifdef NS_DRAW_TO_BUFFER
@interface EmacsSurface : NSObject
{
NSMutableArray *cache;
@ -722,6 +722,7 @@ typedef id instancetype;
- (void) releaseContext;
- (IOSurfaceRef) getSurface;
@end
#endif
/* ==========================================================================

View file

@ -5080,15 +5080,13 @@ in certain situations (rapid incoming events).
id view;
EmacsView *eview = FRAME_NS_VIEW (f);
NSArray *subviews = [[eview superview] subviews];
BOOL removed = NO;
NSTRACE ("ns_judge_scroll_bars");
for (i = [subviews count]-1; i >= 0; --i)
{
view = [subviews objectAtIndex: i];
if (![view isKindOfClass: [EmacsScroller class]]) continue;
if ([view judge])
removed = YES;
[view judge];
}
}