arduino / arduino/ArduinoCore-samd
Unitialized variable `BusOwner`
- Dominant language
- C
- Stars
- 502
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
```
/home/zak/.arduino15/packages/arduino/hardware/samd/1.8.14/libraries/Wire/Wire.cpp: In member function 'virtual size_t arduino::TwoWire::requestFrom(uint8_t, size_t, bool)':
/home/zak/.arduino15/packages/arduino/hardware/samd/1.8.14/libraries/Wire/Wire.cpp:99:5: warning: 'busOwner' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!busOwner)
^~
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Read libraries/Wire/Wire.cpp around line 99 and the surrounding TwoWire::requestFrom implementation to trace how busOwner is initialized and used. Confirm the fix with the same SAMD build that produced the warning, with no -Wmaybe-uninitialized report for this function.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100