diff --git a/GreenshotConfluencePlugin/ConfluenceUtils.cs b/GreenshotConfluencePlugin/ConfluenceUtils.cs index b7fac032b..eef3501a3 100644 --- a/GreenshotConfluencePlugin/ConfluenceUtils.cs +++ b/GreenshotConfluencePlugin/ConfluenceUtils.cs @@ -37,7 +37,7 @@ namespace GreenshotConfluencePlugin { Regex pageIdRegex = new Regex(@"pageId=(\d+)"); Regex spacePageRegex = new Regex(@"\/display\/([^\/]+)\/([^#]+)"); foreach(string browserurl in GetBrowserUrls()) { - string url = null; + string url; try { url = Uri.UnescapeDataString(browserurl).Replace("+", " "); } catch { diff --git a/GreenshotConfluencePlugin/EnumDisplayer.cs b/GreenshotConfluencePlugin/EnumDisplayer.cs index 1888030a1..9c31f2972 100644 --- a/GreenshotConfluencePlugin/EnumDisplayer.cs +++ b/GreenshotConfluencePlugin/EnumDisplayer.cs @@ -66,10 +66,11 @@ namespace GreenshotConfluencePlugin { string displayKey = GetDisplayKeyValue(a); object enumValue = field.GetValue(null); - string displayString = null; + string displayString; if (displayKey != null && Language.hasKey(displayKey)) { displayString = Language.GetString(displayKey); - } if (displayKey != null) { + } + if (displayKey != null) { displayString = displayKey; } else { displayString = enumValue.ToString(); diff --git a/GreenshotDropboxPlugin/DropboxDestination.cs b/GreenshotDropboxPlugin/DropboxDestination.cs index 5a96a3260..004b20334 100644 --- a/GreenshotDropboxPlugin/DropboxDestination.cs +++ b/GreenshotDropboxPlugin/DropboxDestination.cs @@ -54,13 +54,13 @@ namespace GreenshotDropboxPlugin { public override ExportInformation ExportCapture(bool manually, ISurface surface, ICaptureDetails captureDetails) { ExportInformation exportInformation = new ExportInformation(Designation, Description); - string uploadURL = null; - bool uploaded = plugin.Upload(captureDetails, surface, out uploadURL); + string uploadUrl; + bool uploaded = plugin.Upload(captureDetails, surface, out uploadUrl); if (uploaded) { - exportInformation.Uri = uploadURL; + exportInformation.Uri = uploadUrl; exportInformation.ExportMade = true; if (config.AfterUploadLinkToClipBoard) { - ClipboardHelper.SetClipboardData(uploadURL); + ClipboardHelper.SetClipboardData(uploadUrl); } } ProcessExport(exportInformation, surface); diff --git a/GreenshotExternalCommandPlugin/SettingsForm.cs b/GreenshotExternalCommandPlugin/SettingsForm.cs index 4d626e4f7..2bb6a9331 100644 --- a/GreenshotExternalCommandPlugin/SettingsForm.cs +++ b/GreenshotExternalCommandPlugin/SettingsForm.cs @@ -71,7 +71,7 @@ namespace ExternalCommand { listView1.SmallImageList = imageList; int imageNr = 0; foreach(string commando in config.Commands) { - ListViewItem item = null; + ListViewItem item; Image iconForExe = IconCache.IconForCommand(commando); if(iconForExe != null) { imageList.Images.Add(iconForExe); diff --git a/GreenshotImgurPlugin/ImgurDestination.cs b/GreenshotImgurPlugin/ImgurDestination.cs index 78177fd6e..f41425c76 100644 --- a/GreenshotImgurPlugin/ImgurDestination.cs +++ b/GreenshotImgurPlugin/ImgurDestination.cs @@ -58,9 +58,9 @@ namespace GreenshotImgurPlugin { public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { ExportInformation exportInformation = new ExportInformation(Designation, Description); - string uploadURL = null; - exportInformation.ExportMade = plugin.Upload(captureDetails, surface, out uploadURL); - exportInformation.Uri = uploadURL; + string uploadUrl; + exportInformation.ExportMade = plugin.Upload(captureDetails, surface, out uploadUrl); + exportInformation.Uri = uploadUrl; ProcessExport(exportInformation, surface); return exportInformation; } diff --git a/GreenshotPicasaPlugin/PicasaDestination.cs b/GreenshotPicasaPlugin/PicasaDestination.cs index 2a245716a..aaced6491 100644 --- a/GreenshotPicasaPlugin/PicasaDestination.cs +++ b/GreenshotPicasaPlugin/PicasaDestination.cs @@ -54,11 +54,11 @@ namespace GreenshotPicasaPlugin { public override ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) { ExportInformation exportInformation = new ExportInformation(Designation, Description); - string uploadURL = null; - bool uploaded = plugin.Upload(captureDetails, surface, out uploadURL); + string uploadUrl; + bool uploaded = plugin.Upload(captureDetails, surface, out uploadUrl); if (uploaded) { exportInformation.ExportMade = true; - exportInformation.Uri = uploadURL; + exportInformation.Uri = uploadUrl; } ProcessExport(exportInformation, surface); return exportInformation; diff --git a/GreenshotPlugin/Core/AccessibleHelper.cs b/GreenshotPlugin/Core/AccessibleHelper.cs index ed3422f4a..db890c16e 100644 --- a/GreenshotPlugin/Core/AccessibleHelper.cs +++ b/GreenshotPlugin/Core/AccessibleHelper.cs @@ -62,7 +62,7 @@ namespace GreenshotPlugin.Core { private readonly IAccessible accessible; private Accessible[] Children { get { - int num = 0; + int num; object[] res = GetAccessibleChildren(accessible, out num); if (res == null) { return new Accessible[0]; diff --git a/GreenshotPlugin/Core/JSONHelper.cs b/GreenshotPlugin/Core/JSONHelper.cs index 1770e5657..5e44585b7 100644 --- a/GreenshotPlugin/Core/JSONHelper.cs +++ b/GreenshotPlugin/Core/JSONHelper.cs @@ -62,9 +62,8 @@ namespace GreenshotPlugin.Core { int index = 0; IDictionary value = ParseValue(charArray, ref index, ref success) as IDictionary; return value; - } else { - return null; } + return null; } protected static IDictionary ParseObject(char[] json, ref int index, ref bool success) {