From 84fb99b118a9b0880fc0577eff208c8c6930c063 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Wed, 12 Jun 2024 10:58:39 +0200 Subject: [PATCH] drivers/wireless/gs2200m.c: fix warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /home/raiden00/git/RTOS/nuttx/nuttx/drivers/wireless/gs2200m.c:2071:3: note: ‘snprintf’ output between 7 and 9 bytes into a destination of size 8 2071 | snprintf(cmd, sizeof(cmd), "ATE%d\r\n", on); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- drivers/wireless/gs2200m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index 6191aef618..42a6215240 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -2066,7 +2066,7 @@ static enum pkt_type_e gs2200m_enable_bulk(FAR struct gs2200m_dev_s *dev, static enum pkt_type_e gs2200m_enable_echo(FAR struct gs2200m_dev_s *dev, uint8_t on) { - char cmd[8]; + char cmd[9]; snprintf(cmd, sizeof(cmd), "ATE%d\r\n", on); return gs2200m_send_cmd2(dev, cmd);