From a0ab353c07ba67443275b8c957b96aa1316a6e9c Mon Sep 17 00:00:00 2001 From: Andreas Frisch Date: Thu, 18 Jul 2024 16:58:50 +0200 Subject: [PATCH] jsn_sr04t component: RCWL-1655 code quality fix Handle missing enumeration value by default case in switch statement though it is unreachable --- esphome/components/jsn_sr04t/jsn_sr04t.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/jsn_sr04t/jsn_sr04t.cpp b/esphome/components/jsn_sr04t/jsn_sr04t.cpp index 13b5a330ef..6281cee75a 100644 --- a/esphome/components/jsn_sr04t/jsn_sr04t.cpp +++ b/esphome/components/jsn_sr04t/jsn_sr04t.cpp @@ -63,6 +63,8 @@ void Jsnsr04tComponent::check_buffer_() { case AJ_SR04M: checksum = this->buffer_[1] + this->buffer_[2]; break; + default: + return; } if (this->buffer_[3] == checksum) {