[Mono-bugs] [Bug 76435][Nor] New - Unreachable Code in
DataGridBoolColumn
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Oct 14 00:58:46 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by peter at novonyx.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76435
--- shadow/76435 2005-10-14 00:58:45.000000000 -0400
+++ shadow/76435.tmp.13136 2005-10-14 00:58:45.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 76435
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: jordi at ximian.com
+ReportedBy: peter at novonyx.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Unreachable Code in DataGridBoolColumn
+
+When compiling MWF, the following error is thrown:
+System.Windows.Forms/DataGridBoolColumn.cs(285,4): warning CS0162:
+Unreachable code detected
+
+This is due to the CheckState.Checked being 0, and therefore the condition
+in that line will always be true.
+
+I'm guessing that the CheckState.Checked enum value should be 1, not 0.
+
+
+Index: DataGridBoolColumn.cs
+===================================================================
+--- DataGridBoolColumn.cs (revision 51691)
++++ DataGridBoolColumn.cs (working copy)
+@@ -38,7 +38,7 @@
+ {
+ [Flags]
+ private enum CheckState {
+- Checked = 0x00000000,
++ Checked = 0x00000001,
+ UnChecked = 0x00000002,
+ Null = 0x00000004,
+ Selected = 0x00000008
+@@ -276,7 +276,7 @@
+
+ private object FromStateToValue (CheckState state)
+ {
+- state = state & ~CheckState.Selected;
++ state &= ~CheckState.Selected;
+
+ if ((state & CheckState.Checked) ==
+CheckState.Checked) {
+ return truevalue;
More information about the mono-bugs
mailing list