From 1c5208ba71156d225b54592e5e36788748f48ade Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 19 Dec 2020 20:46:55 +0000 Subject: [PATCH] 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. --- src/nsmenu.m | 3 --- src/nsterm.h | 3 ++- src/nsterm.m | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/nsmenu.m b/src/nsmenu.m index 2e0b2c172be..9b56958100a 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -956,15 +956,12 @@ update_frame_tool_bar (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 diff --git a/src/nsterm.h b/src/nsterm.h index 9d3ac75caf3..3fb64494f76 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -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 /* ========================================================================== diff --git a/src/nsterm.m b/src/nsterm.m index e0db204fbc6..a4ee1476933 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5080,15 +5080,13 @@ ns_judge_scroll_bars (struct frame *f) 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]; } } -- 2.39.5