This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 51681a6a8b2 net/wireless: fix compile warning
51681a6a8b2 is described below

commit 51681a6a8b2d0b9ad46e8fc0927d0322656c9fb4
Author: gaohedong <[email protected]>
AuthorDate: Wed Aug 20 10:28:43 2025 +0800

    net/wireless: fix compile warning
    
    fix tasking compile warning isssue
    warnning log: unused variable "IEEE802154_STATUS_STRING"
    
    Signed-off-by: gaohedong <[email protected]>
---
 include/nuttx/wireless/ieee802154/ieee802154_mac.h | 34 ++++------------------
 wireless/ieee802154/mac802154.c                    | 34 +++++++++++++++++++++-
 2 files changed, 39 insertions(+), 29 deletions(-)

diff --git a/include/nuttx/wireless/ieee802154/ieee802154_mac.h 
b/include/nuttx/wireless/ieee802154/ieee802154_mac.h
index e07210f39fe..98254572571 100644
--- a/include/nuttx/wireless/ieee802154/ieee802154_mac.h
+++ b/include/nuttx/wireless/ieee802154/ieee802154_mac.h
@@ -313,34 +313,6 @@ enum ieee802154_status_e
   IEEE802154_STATUS_LIMITREACHED,
 };
 
-static const char *IEEE802154_STATUS_STRING[] =
-{
-  "Success",
-  "Out of capacity",
-  "Denied",
-  "Failure",
-  "Beacon loss",
-  "Channel access failure",
-  "Disable TRX failure",
-  "Failed security check",
-  "Frame too long",
-  "Invalid GTS",
-  "Invalid handle",
-  "Invalid parameter",
-  "No ack",
-  "No beacon",
-  "No data",
-  "No short address",
-  "PAN ID conflict",
-  "Realignment",
-  "Transaction expired",
-  "Transaction overflow",
-  "Tx active",
-  "Unavailable key",
-  "Unsupported attribute",
-  "Limit reached",
-};
-
 /* IEEE 802.15.4 PHY/MAC PIB attributes IDs */
 
 enum ieee802154_attr_e
@@ -1746,6 +1718,12 @@ extern "C"
 #define EXTERN extern
 #endif
 
+/*****************************************************************************
+ * Public Data
+ *****************************************************************************/
+
+EXTERN FAR const char *g_ieee802154_status_string[];
+
 /*****************************************************************************
  * Public Function Prototypes
  *****************************************************************************/
diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c
index 09a59e5c666..cbfda4c059b 100644
--- a/wireless/ieee802154/mac802154.c
+++ b/wireless/ieee802154/mac802154.c
@@ -47,6 +47,38 @@
 #include <nuttx/wireless/ieee802154/ieee802154_mac.h>
 #include <nuttx/wireless/ieee802154/ieee802154_radio.h>
 
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+FAR const char *g_ieee802154_status_string[] =
+{
+  "Success",
+  "Out of capacity",
+  "Denied",
+  "Failure",
+  "Beacon loss",
+  "Channel access failure",
+  "Disable TRX failure",
+  "Failed security check",
+  "Frame too long",
+  "Invalid GTS",
+  "Invalid handle",
+  "Invalid parameter",
+  "No ack",
+  "No beacon",
+  "No data",
+  "No short address",
+  "PAN ID conflict",
+  "Realignment",
+  "Transaction expired",
+  "Transaction overflow",
+  "Tx active",
+  "Unavailable key",
+  "Unsupported attribute",
+  "Limit reached",
+};
+
 /****************************************************************************
  * Private Function Prototypes
  ****************************************************************************/
@@ -902,7 +934,7 @@ static void mac802154_txdone_worker(FAR void *arg)
       primitive = (FAR struct ieee802154_primitive_s *)txdesc->conf;
 
       wlinfo("Tx status: %s\n",
-             IEEE802154_STATUS_STRING[txdesc->conf->status]);
+             g_ieee802154_status_string[txdesc->conf->status]);
 
       switch (txdesc->frametype)
         {

Reply via email to