emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/ns/performance 77a07a2 4/6: Fix GNUstep warnings


From: Alan Third
Subject: scratch/ns/performance 77a07a2 4/6: Fix GNUstep warnings
Date: Thu, 31 Dec 2020 10:45:20 -0500 (EST)

branch: scratch/ns/performance
commit 77a07a2f8d16e4f3fa8e0ae23b4349919226ce8b
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>

    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 5b0225c..254cb45 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 50405ea..a1f7fdc 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 e621a69..14eabfd 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];
     }
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]