Skip to content

Commit

Permalink
Fix some warnings
Browse files Browse the repository at this point in the history
Appear to happen on some never compiler versions
  • Loading branch information
pgrawehr committed Feb 11, 2024
1 parent 0207a83 commit 7ce393d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/devices/Display/Large4Digit7SegmentDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ public void Write(string value, Alignment alignment = Alignment.Left)
value = " " + value[0] + value.Substring(2, 2);
break;
case 5 when value[2] != ':':
throw new ArgumentException($"{nameof(value)}[2] must be a ':'", nameof(value));
#pragma warning disable CA2208 // False positive because the message uses the parameter name "value"
throw new ArgumentException("value[2] must be a ':'", nameof(value));
#pragma warning restore CA2208
case 5:
Dots |= Dot.CenterColon;
value = value.Substring(0, 2) + value.Substring(3, 2);
Expand Down
2 changes: 1 addition & 1 deletion src/devices/ShiftRegister/ShiftRegister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void ShiftBit(PinValue value)
{
if (_controller is null || _pinMapping.SerialDataInput < 0)
{
throw new ArgumentNullException(nameof(ShiftBit), "GpioController was not provided or {nameof(_pinMapping.SerialDataInput)} not mapped to pin");
throw new ArgumentNullException(nameof(value), "GpioController was not provided or {nameof(_pinMapping.SerialDataInput)} not mapped to pin");
}

// writes value to serial data pin
Expand Down

0 comments on commit 7ce393d

Please sign in to comment.