mirror of
https://github.com/esphome/esphome.git
synced 2025-09-29 00:22:21 +01:00
Fix Clang 11 finds (#1880)
This commit is contained in:
@@ -33,7 +33,7 @@ void SPIAS3935Component::write_register(uint8_t reg, uint8_t mask, uint8_t bits,
|
||||
uint8_t SPIAS3935Component::read_register(uint8_t reg) {
|
||||
uint8_t value = 0;
|
||||
this->enable();
|
||||
this->write_byte(reg |= SPI_READ_M);
|
||||
this->write_byte(reg | SPI_READ_M);
|
||||
value = this->read_byte();
|
||||
// According to datsheet, the chip select must be written HIGH, LOW, HIGH
|
||||
// to correctly end the READ command.
|
||||
|
@@ -67,7 +67,7 @@ bool RFBridgeComponent::parse_bridge_byte_(uint8_t byte) {
|
||||
|
||||
data.length = raw[2];
|
||||
data.protocol = raw[3];
|
||||
char next_byte[2];
|
||||
char next_byte[3];
|
||||
for (uint8_t i = 0; i < data.length - 1; i++) {
|
||||
sprintf(next_byte, "%02X", raw[4 + i]);
|
||||
data.code += next_byte;
|
||||
@@ -85,7 +85,7 @@ bool RFBridgeComponent::parse_bridge_byte_(uint8_t byte) {
|
||||
|
||||
uint8_t buckets = raw[2] << 1;
|
||||
std::string str;
|
||||
char next_byte[2];
|
||||
char next_byte[3];
|
||||
|
||||
for (uint32_t i = 0; i <= at; i++) {
|
||||
sprintf(next_byte, "%02X", raw[i]);
|
||||
|
Reference in New Issue
Block a user