From 71dc3b4fbf685acba49ad9515f0777900e3ce621 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 13:57:28 +0000 Subject: [PATCH] la_mojo: fix the build after the YOLO filter addition - kernelEventFilterYOLO declared m_fThreadProc() but never defined it: the link failed with "undefined reference to vtable for kernelEventFilterYOLO". Added a placeholder worker loop (same style as the Bubble filter) until the YOLO processing is implemented. - m_sYOLOFilterData is zero-initialised (validate() memcmp's it). - Silenced the new unused-parameter warnings: validateTarget / dispatchEvent stubs and dataBinder::getYOLOFilterData (the latter warned in every file that includes dataBinder.h). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16 --- lib/App/common/dataBinder.h | 1 + lib/App/common/kernelEventFilterYOLO.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lib/App/common/dataBinder.h b/lib/App/common/dataBinder.h index 11352b93..e0477c06 100644 --- a/lib/App/common/dataBinder.h +++ b/lib/App/common/dataBinder.h @@ -802,6 +802,7 @@ class dataBinder return 0; } virtual YOLO_FILTER_DATA * getYOLOFilterData( uint32_t flt_id ){ + if ( flt_id ) return NULL; return NULL; } virtual bool fillShadow2D(uint32_t ID, SHADOW & SH) diff --git a/lib/App/common/kernelEventFilterYOLO.cpp b/lib/App/common/kernelEventFilterYOLO.cpp index 1a28138d..b4fa73c2 100644 --- a/lib/App/common/kernelEventFilterYOLO.cpp +++ b/lib/App/common/kernelEventFilterYOLO.cpp @@ -18,6 +18,8 @@ basicEventHandler(), basicThread() { m_pLog = basicLogCollection::getInstance(); + // validate() compares it with the database copy: must start defined + memset(&m_sYOLOFilterData, 0, sizeof(YOLO_FILTER_DATA)); } kernelEventFilterYOLO::~kernelEventFilterYOLO() @@ -41,6 +43,8 @@ bool kernelEventFilterYOLO::validate() return false; } bool kernelEventFilterYOLO::validateTarget(uint32_t DevID, TARGET_DATA * ptr){ + (void) DevID; // ToDo: YOLO filtering + (void) ptr; return false; } bool kernelEventFilterYOLO::initFilter(){ @@ -50,5 +54,18 @@ bool kernelEventFilterYOLO::stopFilter(){ return false; } bool kernelEventFilterYOLO::dispatchEvent(EVENT_CONTAINER * Evt){ + (void) Evt; // ToDo: YOLO event handling return false; } + +// Worker thread (declared in the header but not defined: "undefined reference to vtable for +// kernelEventFilterYOLO" at link time). Placeholder loop until the YOLO processing is added. +void kernelEventFilterYOLO::m_fThreadProc(void) +{ + m_bThreadStatus = TH_WORKING; + pthread_setname_np(pthread_self(), "filterYOLO"); + while (m_bThreadStatus < TH_ENDED) + { + SLEEP(DEFAULT_THREAD_SLEEP_TIME); + }; +}