mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 14:38:10 +01:00
Fix Clang 11 finds (#1880)
This commit is contained in:
parent
0426be9280
commit
b80f3fdec9
3 changed files with 3 additions and 5 deletions
|
@ -20,11 +20,9 @@ Checks: >-
|
|||
-cert-oop57-cpp,
|
||||
-cert-str34-c,
|
||||
-clang-analyzer-core.CallAndMessage,
|
||||
-clang-analyzer-deadcode.DeadStores,
|
||||
-clang-analyzer-optin.*,
|
||||
-clang-analyzer-osx.*,
|
||||
-clang-analyzer-security.*,
|
||||
-clang-diagnostic-fortify-source,
|
||||
-clang-diagnostic-shadow-field,
|
||||
-cppcoreguidelines-avoid-c-arrays,
|
||||
-cppcoreguidelines-avoid-goto,
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue