stride icon indicating copy to clipboard operation
stride copied to clipboard

Next round of addressing CS Warnings

Open jrinker03 opened this issue 2 years ago • 1 comments

PR Details

Continuing to address C# warnings.

Description

This change addresses most or all of the following issues: CS0414 - The field 'foo' is assigned but its value is never used CS0612 - is obsolete. (see Note below) CS0649 - Field 'foo' is never assigned to, and will always have its default value CS0659 - 'foo' overrides Object.Equals(object o) but does not override Object.GetHashCode() CS0675 - Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first CS1998 - This async method lacks 'await' operators and will run synchronously. CS4014 - Because this call is not awaited, execution of the current method continues before the call is completed. CS8073 - The result of the expression is always 'false' since a value of type 'Guid' is never equal to 'null'

Note that because NodeViewModel.MemberInfo was always null, this caused 3 dependent providers to always have their MatchNode method return false. I left the three classes in this iteration because they are still referenced in xaml and I'm unclear of the effect of removing the xaml at this time.

In the case of TestThumbnails.cs, it was half-finished and not containing any valid tests so it was removed.

Also, some other minor hygiene changes (sort/remove usings, remove unused package refs, etc.).

Related Issue

#1383

Motivation and Context

See related issue

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [ ] My change requires a change to the documentation.
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

jrinker03 avatar May 02 '22 18:05 jrinker03

Would you like to finish this @jrinker03? Would be best to see the result of this before merging a lot more warnings.

ericwj avatar Aug 07 '22 13:08 ericwj