mirror of
https://github.com/esphome/esphome.git
synced 2025-09-29 08:32:26 +01:00
Fix clang-tidy header filter (#2385)
* Fix clang-tidy header filter * Allow private members * Fix clang-tidy detections * Run clang-format * Fix remaining detections * Fix graph * Run clang-format
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
#ifdef USE_SOCKET_IMPL_LWIP_TCP
|
||||
|
||||
#define LWIP_INTERNAL
|
||||
#include <sys/types.h>
|
||||
#include "lwip/inet.h"
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
#include <cstdint>
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Address families. */
|
||||
#define AF_UNSPEC 0
|
||||
@@ -45,9 +45,10 @@
|
||||
|
||||
#define SOL_SOCKET 0xfff /* options for socket level */
|
||||
|
||||
typedef uint8_t sa_family_t;
|
||||
typedef uint16_t in_port_t;
|
||||
using sa_family_t = uint8_t;
|
||||
using in_port_t = uint16_t;
|
||||
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
struct sockaddr_in {
|
||||
uint8_t sin_len;
|
||||
sa_family_t sin_family;
|
||||
@@ -57,6 +58,7 @@ struct sockaddr_in {
|
||||
char sin_zero[SIN_ZERO_LEN];
|
||||
};
|
||||
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
struct sockaddr_in6 {
|
||||
uint8_t sin6_len; /* length of this structure */
|
||||
sa_family_t sin6_family; /* AF_INET6 */
|
||||
@@ -66,12 +68,14 @@ struct sockaddr_in6 {
|
||||
uint32_t sin6_scope_id; /* Set of interfaces for scope */
|
||||
};
|
||||
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
struct sockaddr {
|
||||
uint8_t sa_len;
|
||||
sa_family_t sa_family;
|
||||
char sa_data[14];
|
||||
};
|
||||
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
struct sockaddr_storage {
|
||||
uint8_t s2_len;
|
||||
sa_family_t ss_family;
|
||||
@@ -79,8 +83,9 @@ struct sockaddr_storage {
|
||||
uint32_t s2_data2[3];
|
||||
uint32_t s2_data3[3];
|
||||
};
|
||||
typedef uint32_t socklen_t;
|
||||
using socklen_t = uint32_t;
|
||||
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
struct iovec {
|
||||
void *iov_base;
|
||||
size_t iov_len;
|
||||
@@ -106,13 +111,13 @@ struct iovec {
|
||||
|
||||
#ifdef USE_SOCKET_IMPL_BSD_SOCKETS
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <cstdint>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef USE_ARDUINO
|
||||
// arduino-esp32 declares a global var called INADDR_NONE which is replaced
|
||||
@@ -121,7 +126,7 @@ struct iovec {
|
||||
#undef INADDR_NONE
|
||||
#endif
|
||||
// not defined for ESP32
|
||||
typedef uint32_t socklen_t;
|
||||
using socklen_t = uint32_t;
|
||||
|
||||
#define ESPHOME_INADDR_ANY ((uint32_t) 0x00000000UL)
|
||||
#define ESPHOME_INADDR_NONE ((uint32_t) 0xFFFFFFFFUL)
|
||||
|
Reference in New Issue
Block a user