Resharper give false positive warnings in an unsafe block
Hi,
When I use code that looks like this:
unsafe
{
int i = 10;
int* pi = &i;
*pi = *pi + 1;
}
Resharper marks the assignment to i as "Value assigned is not used in any
execution path", while actually i is referenced and then dereferenced back.
Accepting resharper's tip to "Remove redundant initializer" will erroneously
change functionality.
When I use the unary & operator on a variable, resharper should treat that
variable as potentially being read & written to, as seen in the above example, Don't you think?
Omer.
Please sign in to leave a comment.
Thank you for the feedback.
This issue will be fixed shortly
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Omer Mor" <no_reply@jetbrains.com> wrote in message
news:13158965.1173473354275.JavaMail.itn@is.intellij.net...
>
Hello,
We appreciate your feedback.
The corresponding JIRA request has been created, and you are welcome to monitor
its status at http://www.jetbrains.net/jira/browse/RSRP-36895.
Best regards,
- Development Team.
Thank you for the quick response.
Omer.