U4-11546 - [v7] Clean up to remove compiler warnings

Created by Andy Thompson 30 Jul 2018, 20:44:14 Updated by Andy Thompson 31 Jul 2018, 16:27:22

Tags: PR

What did I do?

I have cleaned some classes to remove compiler warnings. Some are in classes marked as obsolete; however the overall reduction in compiler warnings makes the code base cleaner.

||Warning|||| |CS0109|The member does not hide an accessible member. The new keyword is not required.| |CS0162|Unreachable code detected| |CS0168|The variable is declared but never used| |CS0169|The field is never used| |CS0219|The variable is assigned but its value is never used| |CS0252|Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'| |CS1717|Assignment made to same variable; did you mean to assign something else?|

Note: There are other instances of CS0162 and CS0169 warnings left in the codebase. I could remove them as some seem to be there for debugging and some seem abandoned refactorings. Working on the premise that commented out code should be deleted (see Uncle Bob, et al) I could remove them but I won't at the minute unless I have permission to do so.

Comments

Andy Thompson 30 Jul 2018, 23:01:20

PR: https://github.com/umbraco/Umbraco-CMS/pull/2823


Priority: Normal

Type: Task

State: Fixed

Assignee:

Difficulty: Normal

Category: Architecture

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.12.0

Due in version: 7.12.0

Sprint:

Story Points:

Cycle: