[vlc-commits] macosx: remove unused variables

Felix Paul Kühne git at videolan.org
Sat Jun 9 15:55:48 CEST 2018


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Sat Jun  9 15:55:33 2018 +0200| [6aa60ab0a169f22fb2c2461f9f1a37cbca32b951] | committer: Felix Paul Kühne

macosx: remove unused variables

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6aa60ab0a169f22fb2c2461f9f1a37cbca32b951
---

 modules/gui/macosx/VLCAudioEffectsWindowController.m | 2 --
 modules/gui/macosx/VLCCoreDialogProvider.m           | 2 +-
 modules/gui/macosx/VLCCoreInteraction.m              | 1 -
 modules/gui/macosx/VLCMainMenu.m                     | 3 ---
 modules/gui/macosx/VLCOpenWindowController.m         | 2 --
 modules/gui/macosx/VLCPLModel.m                      | 1 -
 modules/gui/macosx/VLCPlaylist.m                     | 5 -----
 modules/gui/macosx/VLCSimplePrefsController.m        | 6 +-----
 modules/gui/macosx/VLCVideoEffectsWindowController.m | 3 ---
 modules/gui/macosx/applescript.m                     | 1 -
 modules/gui/macosx/prefs_widgets.m                   | 7 ++-----
 11 files changed, 4 insertions(+), 29 deletions(-)

diff --git a/modules/gui/macosx/VLCAudioEffectsWindowController.m b/modules/gui/macosx/VLCAudioEffectsWindowController.m
index 08543a170f..bee6bf0087 100644
--- a/modules/gui/macosx/VLCAudioEffectsWindowController.m
+++ b/modules/gui/macosx/VLCAudioEffectsWindowController.m
@@ -315,7 +315,6 @@
 
 - (void)resetProfileSelector
 {
-    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     [_profilePopup removeAllItems];
 
     // Ignore "Default" index 0 from settings
@@ -410,7 +409,6 @@
     if (_applyProfileCheckbox.state == NSOffState)
         return;
 
-    playlist_t *p_playlist = pl_Get(getIntf());
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     if ([[self generateProfileString] compare:[VLCAudioEffectsWindowController defaultProfileString]] == NSOrderedSame)
         return;
diff --git a/modules/gui/macosx/VLCCoreDialogProvider.m b/modules/gui/macosx/VLCCoreDialogProvider.m
index 41f310384f..edc9e92091 100644
--- a/modules/gui/macosx/VLCCoreDialogProvider.m
+++ b/modules/gui/macosx/VLCCoreDialogProvider.m
@@ -297,7 +297,7 @@ static void updateProgressCallback(void *p_data,
     [progressIndicator startAnimation:self];
 
     [progressWindow center];
-    NSInteger returnValue = [NSApp runModalForWindow:progressWindow];
+    [NSApp runModalForWindow:progressWindow];
     [progressWindow close];
 
     [progressIndicator stopAnimation:self];
diff --git a/modules/gui/macosx/VLCCoreInteraction.m b/modules/gui/macosx/VLCCoreInteraction.m
index 220a19fb8b..cdd229a182 100644
--- a/modules/gui/macosx/VLCCoreInteraction.m
+++ b/modules/gui/macosx/VLCCoreInteraction.m
@@ -543,7 +543,6 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
 {
     input_thread_t * p_input = pl_CurrentInput(getIntf());
     if (p_input) {
-        mtime_t currentTime = var_GetInteger(p_input, "time");
         var_SetInteger(p_input, "time", time);
         vlc_object_release(p_input);
     }
diff --git a/modules/gui/macosx/VLCMainMenu.m b/modules/gui/macosx/VLCMainMenu.m
index 74ae8d85f3..3337c7569f 100644
--- a/modules/gui/macosx/VLCMainMenu.m
+++ b/modules/gui/macosx/VLCMainMenu.m
@@ -105,7 +105,6 @@
 #endif
 
     NSString* keyString;
-    vlc_value_t val;
     VLCStringUtility *stringUtility = [VLCStringUtility sharedInstance];
     char *key;
 
@@ -995,7 +994,6 @@
 
 - (void)togglePostProcessing:(id)sender
 {
-    char *psz_name = "postproc";
     NSInteger count = [_postprocessingMenu numberOfItems];
     for (NSUInteger x = 0; x < count; x++)
         [[_postprocessingMenu itemAtIndex:x] setState:NSOffState];
@@ -1604,7 +1602,6 @@
 
 - (BOOL)validateMenuItem:(NSMenuItem *)mi
 {
-    NSString *title = [mi title];
     BOOL enabled = YES;
     vlc_value_t val;
     playlist_t *p_playlist = pl_Get(getIntf());
diff --git a/modules/gui/macosx/VLCOpenWindowController.m b/modules/gui/macosx/VLCOpenWindowController.m
index ebed37b6f5..47323d53f3 100644
--- a/modules/gui/macosx/VLCOpenWindowController.m
+++ b/modules/gui/macosx/VLCOpenWindowController.m
@@ -1099,8 +1099,6 @@ static NSString *kCaptureTabViewId  = @"capture";
 
 - (IBAction)openCaptureModeChanged:(id)sender
 {
-    intf_thread_t * p_intf = getIntf();
-
     if ([[[_captureModePopup selectedItem] title] isEqualToString: _NS("Screen")]) {
         [_captureTabView selectTabViewItemAtIndex:1];
 
diff --git a/modules/gui/macosx/VLCPLModel.m b/modules/gui/macosx/VLCPLModel.m
index 379dbafd09..89bf55e008 100644
--- a/modules/gui/macosx/VLCPLModel.m
+++ b/modules/gui/macosx/VLCPLModel.m
@@ -604,7 +604,6 @@ static int VolumeUpdated(vlc_object_t *p_this, const char *psz_var,
 
 - (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
 {
-    NSUInteger itemCount = [items count];
     _draggedItems = [[NSMutableArray alloc] initWithArray:items];
 
     /* Add the data to the pasteboard object. */
diff --git a/modules/gui/macosx/VLCPlaylist.m b/modules/gui/macosx/VLCPlaylist.m
index 8a881d7650..b960fa9e1a 100644
--- a/modules/gui/macosx/VLCPlaylist.m
+++ b/modules/gui/macosx/VLCPlaylist.m
@@ -192,7 +192,6 @@
 
 - (void)setPlaylistHeaderView:(NSTableHeaderView * __nullable)playlistHeaderView
 {
-    VLCMainMenu *mainMenu = [[VLCMain sharedInstance] mainMenu];
     _playlistHeaderView = playlistHeaderView;
 
     // Setup playlist table column selection for both context and main menu
@@ -504,7 +503,6 @@
 - (input_item_t *)createItem:(NSDictionary *)itemToCreateDict
 {
     intf_thread_t *p_intf = getIntf();
-    playlist_t *p_playlist = pl_Get(p_intf);
 
     input_item_t *p_input;
     BOOL b_rem = FALSE, b_dir = FALSE, b_writable = FALSE;
@@ -668,7 +666,6 @@
     [selectedRows getIndexes:indexes maxCount:count inIndexRange:nil];
 
     id item;
-    playlist_item_t *p_item;
     for (NSUInteger i = 0; i < count; i++) {
         item = [_outlineView itemAtRow: indexes[i]];
 
@@ -708,8 +705,6 @@
     intf_thread_t *p_intf = getIntf();
     NSString * identifier = [aTableColumn identifier];
 
-    playlist_t *p_playlist = pl_Get(p_intf);
-
     if (_sortTableColumn == aTableColumn)
         b_isSortDescending = !b_isSortDescending;
     else
diff --git a/modules/gui/macosx/VLCSimplePrefsController.m b/modules/gui/macosx/VLCSimplePrefsController.m
index 003102dcb9..9bf68d0361 100644
--- a/modules/gui/macosx/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/VLCSimplePrefsController.m
@@ -525,9 +525,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
 
 - (void)resetControls
 {
-    module_config_t *p_item;
     int i, y = 0;
-    char *psz_tmp;
 
     /**********************
      * interface settings *
@@ -669,7 +667,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
     [self setupField:_input_recordTextField forOption:"input-record-path"];
 
     [self setupButton:_input_hardwareAccelerationCheckbox forBoolValue: "videotoolbox"];
-    [_input_postprocTextField setIntValue: config_GetInt("postproc-q")];
+//    [_input_postprocTextField setIntValue: config_GetInt("postproc-q")];
     [_input_postprocTextField setToolTip: _NS(config_GetLabel(p_intf, "postproc-q"))];
     [self setupButton:_input_skipFramesCheckbox forBoolValue: "skip-frames"];
     [self setupButton:_input_aviPopup forIntList: "avi-index"];
@@ -1295,8 +1293,6 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
 
 - (IBAction)urlHandlerAction:(id)sender
 {
-    NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
-
     if (sender == _input_urlhandlerButton) {
         NSArray *handlers;
         NSString *handler;
diff --git a/modules/gui/macosx/VLCVideoEffectsWindowController.m b/modules/gui/macosx/VLCVideoEffectsWindowController.m
index 8c976222df..00a6202531 100644
--- a/modules/gui/macosx/VLCVideoEffectsWindowController.m
+++ b/modules/gui/macosx/VLCVideoEffectsWindowController.m
@@ -381,7 +381,6 @@
 
 - (void)resetProfileSelector
 {
-    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
     [_profilePopup removeAllItems];
 
     // Ignore "Default" index 0 from settings
@@ -479,8 +478,6 @@
 {
     intf_thread_t *p_intf = getIntf();
     playlist_t *p_playlist = pl_Get(p_intf);
-    NSString *tmpString;
-    char *tmpChar;
     BOOL b_state;
 
     /* do we have any filter enabled? if yes, show it. */
diff --git a/modules/gui/macosx/applescript.m b/modules/gui/macosx/applescript.m
index 12806794fa..04676e9c5b 100644
--- a/modules/gui/macosx/applescript.m
+++ b/modules/gui/macosx/applescript.m
@@ -69,7 +69,6 @@
     NSString *o_parameter = [self directParameter];
 
     intf_thread_t * p_intf = getIntf();
-    playlist_t * p_playlist = pl_Get(p_intf);
 
     if ([o_command isEqualToString:@"play"])
         [[VLCCoreInteraction sharedInstance] playOrPause];
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index a382dee25d..308e56cf93 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1885,11 +1885,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
         [o_popup setAutoresizingMask:NSViewWidthSizable ];
 
         if (o_keys_menu == nil) {
-            unsigned int i;
             o_keys_menu = [[NSMenu alloc] initWithTitle: @"Keys Menu"];
 #warning This does not work anymore. FIXME.
 #if 0
-            for (i = 0; i < sizeof(vlc_key) / sizeof(key_descriptor_t); i++)
+            for (unsigned int i = 0; i < sizeof(vlc_key) / sizeof(key_descriptor_t); i++)
                 if (vlc_key[i].psz_key_string)
                     POPULATE_A_KEY(o_keys_menu,toNSStr(vlc_key[i].psz_key_string),
                                    vlc_key[i].i_key_code)
@@ -1965,7 +1964,6 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             module_config_t *p_configlist = module_config_get(p_parser, &confsize);
 
             for (i = 0; i < confsize; i++) {
-                unsigned int unused;
                 module_config_t *p_config = &p_configlist[i];
                 NSString *o_modulelongname, *o_modulename;
                 NSNumber *o_moduleenabled = nil;
@@ -2200,7 +2198,6 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
                       [pb propertyListForType:@"VLC media player module"]) != NULL) {
         NSEnumerator *iter = nil;
         id val;
-        BOOL isCopy = (srcMask & NSDragOperationMove) ? NO:YES;
         // Move the modules
         iter = [array objectEnumerator];
         while ((val = [iter nextObject]) != NULL) {
@@ -2267,7 +2264,7 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
           withView:(NSView *)parentView
 {
     NSRect mainFrame = [parentView frame];
-    NSString *labelString, *toolTip;
+    NSString *labelString;
     mainFrame.size.height = 17;
     mainFrame.size.width = mainFrame.size.width - LEFTMARGIN - RIGHTMARGIN;
     mainFrame.origin.x = LEFTMARGIN;



More information about the vlc-commits mailing list