From a16f2607018296ec84c579f2b9f5c2fb15298179 Mon Sep 17 00:00:00 2001 From: Cel Skeggs Date: Tue, 21 Jan 2025 13:00:22 -0800 Subject: [PATCH] Fix format string specifiers for queue names (#3146) --- Fw/Comp/ActiveComponentBase.cpp | 2 +- Fw/Comp/QueuedComponentBase.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Fw/Comp/ActiveComponentBase.cpp b/Fw/Comp/ActiveComponentBase.cpp index 879cd75342..7a7975f363 100644 --- a/Fw/Comp/ActiveComponentBase.cpp +++ b/Fw/Comp/ActiveComponentBase.cpp @@ -60,7 +60,7 @@ namespace Fw { taskName = this->getObjName(); #else char taskNameChar[FW_TASK_NAME_BUFFER_SIZE]; - (void)snprintf(taskNameChar,sizeof(taskNameChar),"ActComp_%d",Os::Task::getNumTasks()); + (void)snprintf(taskNameChar,sizeof(taskNameChar),"ActComp_%" PRI_FwSizeType,Os::Task::getNumTasks()); taskName = taskNameChar; #endif // Cooperative threads tasks externalize the task loop, and as such use the state machine as their task function diff --git a/Fw/Comp/QueuedComponentBase.cpp b/Fw/Comp/QueuedComponentBase.cpp index 0c91d9ae63..b649093ff2 100644 --- a/Fw/Comp/QueuedComponentBase.cpp +++ b/Fw/Comp/QueuedComponentBase.cpp @@ -37,7 +37,7 @@ namespace Fw { queueName = this->m_objName; #else char queueNameChar[FW_QUEUE_NAME_BUFFER_SIZE]; - (void)snprintf(queueNameChar,sizeof(queueNameChar),"CompQ_%d",Os::Queue::getNumQueues()); + (void)snprintf(queueNameChar,sizeof(queueNameChar),"CompQ_%" PRI_FwSizeType,Os::Queue::getNumQueues()); queueName = queueNameChar; #endif return this->m_queue.create(queueName, depth, msgSize);