From dd4b7f5d1336af5bc3937205ff13ab982f7c77df Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 10 Oct 2024 11:07:56 -0400 Subject: [PATCH 1/2] mark max1704x TAG const --- components/max1704x/max1704x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/max1704x/max1704x.c b/components/max1704x/max1704x.c index 3f0c6ca9..9bbce3f6 100644 --- a/components/max1704x/max1704x.c +++ b/components/max1704x/max1704x.c @@ -98,7 +98,7 @@ #define CHECK(x) do { esp_err_t __; if ((__ = x) != ESP_OK) return __; } while (0) #define CHECK_ARG(ARG) do { if (!(ARG)) return ESP_ERR_INVALID_ARG; } while (0) -static char *TAG = "max1704x"; +static const char *TAG = "max1704x"; /** * Private functions From 42e575abc3f4291add364407f268ac749f4858f8 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 10 Oct 2024 11:25:16 -0400 Subject: [PATCH 2/2] constify TAG in example.c --- components/example/example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/example/example.c b/components/example/example.c index 7dfc4209..f7878749 100644 --- a/components/example/example.c +++ b/components/example/example.c @@ -33,7 +33,7 @@ /* do NOT use upper case for variables. use `snake_case` instead of * `CamelCase`. */ -static char *tag = "example"; +static const char *tag = "example"; /* prefix public function names with the component name, `example_` in this * case. */