From d5c19c267cd0f332aa72752cb7995a43b3963a60 Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Wed, 14 Aug 2024 17:35:11 +0200 Subject: [PATCH] fix clang tidy --- esphome/components/md5/md5.h | 4 ++++ esphome/components/mlx90393/sensor_mlx90393.cpp | 2 ++ esphome/components/mlx90393/sensor_mlx90393.h | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/esphome/components/md5/md5.h b/esphome/components/md5/md5.h index 4ec8a8a12c..64448dc056 100644 --- a/esphome/components/md5/md5.h +++ b/esphome/components/md5/md5.h @@ -27,6 +27,10 @@ #define MD5_CTX_TYPE LT_MD5_CTX_T #endif +#if defined(USE_ZEPHYR) +#define MD5_CTX_TYPE void * +#endif + namespace esphome { namespace md5 { diff --git a/esphome/components/mlx90393/sensor_mlx90393.cpp b/esphome/components/mlx90393/sensor_mlx90393.cpp index d4431a7334..b05cf4137a 100644 --- a/esphome/components/mlx90393/sensor_mlx90393.cpp +++ b/esphome/components/mlx90393/sensor_mlx90393.cpp @@ -1,4 +1,5 @@ #include "sensor_mlx90393.h" +#if defined(USE_ARDUINO) || defined(USE_ESP_IDF) #include "esphome/core/log.h" namespace esphome { @@ -89,3 +90,4 @@ void MLX90393Cls::update() { } // namespace mlx90393 } // namespace esphome +#endif diff --git a/esphome/components/mlx90393/sensor_mlx90393.h b/esphome/components/mlx90393/sensor_mlx90393.h index 8dfb7e6a13..464046336f 100644 --- a/esphome/components/mlx90393/sensor_mlx90393.h +++ b/esphome/components/mlx90393/sensor_mlx90393.h @@ -1,5 +1,6 @@ #pragma once - +#include "esphome/core/defines.h" +#if defined(USE_ARDUINO) || defined(USE_ESP_IDF) #include "esphome/core/component.h" #include "esphome/components/sensor/sensor.h" #include "esphome/components/i2c/i2c.h" @@ -57,3 +58,4 @@ class MLX90393Cls : public PollingComponent, public i2c::I2CDevice, public MLX90 } // namespace mlx90393 } // namespace esphome +#endif