adium 4571:13e6121da7f7: Fixed "Value stored to 'level' during i...

commits at adium.im commits at adium.im
Fri Jan 27 00:22:07 UTC 2012


details:	http://hg.adium.im/adium/rev/13e6121da7f7
revision:	4571:13e6121da7f7
branch:		(none)
author:		Adrian Godoroja <robotive at me.com>
date:		Fri Jan 27 02:02:08 2012 +0200

Fixed "Value stored to 'level' during its initialization is never read". Analyzer Warnings--.

diffs (33 lines):

diff -r 6fa6b93fcf88 -r 13e6121da7f7 Plugins/Dual Window Interface/AIMessageWindowController.m
--- a/Plugins/Dual Window Interface/AIMessageWindowController.m	Fri Jan 27 01:36:07 2012 +0200
+++ b/Plugins/Dual Window Interface/AIMessageWindowController.m	Fri Jan 27 02:02:08 2012 +0200
@@ -408,14 +408,24 @@
 		
 		[self _updateWindowTitleAndIcon];
 
-		AIWindowLevel	windowLevel = [[prefDict objectForKey:KEY_WINDOW_LEVEL] intValue];
-		NSInteger				level = NSNormalWindowLevel;
+		AIWindowLevel windowLevel = [[prefDict objectForKey:KEY_WINDOW_LEVEL] intValue];
+		NSInteger level;
 		
 		switch (windowLevel) {
-			case AINormalWindowLevel: level = NSNormalWindowLevel; break;
-			case AIFloatingWindowLevel: level = NSFloatingWindowLevel; break;
-			case AIDesktopWindowLevel: level = kCGDesktopWindowLevel; break;
+			case AINormalWindowLevel:
+				level = NSNormalWindowLevel;
+				break;
+			case AIFloatingWindowLevel:
+				level = NSFloatingWindowLevel;
+				break;
+			case AIDesktopWindowLevel:
+				level = kCGDesktopWindowLevel;
+				break;
+			default:
+				level = NSNormalWindowLevel;
+				break;
 		}
+		
 		[window setLevel:level];
 		[window setHidesOnDeactivate:[[prefDict objectForKey:KEY_WINDOW_HIDE] boolValue]];
     }




More information about the commits mailing list