Bogus local variable never used message
The following code incorrectly shows threadRegistryWatch and Time Delay as local variables that are never used.
0)
{
Thread.Sleep(TimeDelay); // Give all the changes time to come through
HandleRegistryChange();
Interlocked.Decrement(ref m_nOutstandingRegistryChanges);
}
// Store activity information in registry for the foreground dialog to retrieve
GetCurrentActivity();
}
}
catch (Exception x)
{
try
{
// Service has crashed
RegistryKey regKeyActivity = Registry.LocalMachine.CreateSubKey(Global.RegistryKeyActivity);
if (regKeyActivity!=null)
{
// Write the status to the registry for display on the console
regKeyActivity.SetValue(Global.RegistryValueActivity, "0,0,0,0 Service: " + x.Message.Replace("\r", string.Empty).Replace("\n", string.Empty) + "\r\n");
regKeyActivity.Close();
}
}
catch // ignore errors in here
{
}
}
}]]>
Please sign in to leave a comment.
Could you, please, post this as a bug into our tracker?
--
Andrey Simanovsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Sam Mackrill" <no_mail@jetbrains.com> wrote in message
news:18250676.1089991182713.JavaMail.itn@is.intellij.net...
local variables that are never used.
>
>
>
Done