Skip to content

Commit 2a3db31

Browse files
committed
ISO C++ says that these are ambiguous
porthub.cpp:38:34: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
1 parent bb62658 commit 2a3db31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/Unit/PbHUB/porthub.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ uint16_t PortHub::hub_a_read_value(uint8_t reg) {
1919
uint8_t RegValue_L = 0;
2020
uint8_t RegValue_H = 0;
2121

22-
Wire.requestFrom(_iic_addr, 2);
22+
Wire.requestFrom(_iic_addr, (uint8_t)2);
2323
while (Wire.available()) {
2424
RegValue_L = Wire.read();
2525
RegValue_H = Wire.read();
@@ -35,7 +35,7 @@ uint8_t PortHub::hub_d_read_value_A(uint8_t reg) {
3535

3636
uint8_t RegValue = 0;
3737

38-
Wire.requestFrom(_iic_addr, 1);
38+
Wire.requestFrom(_iic_addr, (uint8_t)1);
3939
while (Wire.available()) {
4040
RegValue = Wire.read();
4141
}
@@ -49,7 +49,7 @@ uint8_t PortHub::hub_d_read_value_B(uint8_t reg) {
4949

5050
uint8_t RegValue = 0;
5151

52-
Wire.requestFrom(_iic_addr, 1);
52+
Wire.requestFrom(_iic_addr, (uint8_t)1);
5353
while (Wire.available()) {
5454
RegValue = Wire.read();
5555
}

0 commit comments

Comments
 (0)