-
Notifications
You must be signed in to change notification settings - Fork 4
Merge #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/RDK-60308_final
Are you sure you want to change the base?
Merge #171
Conversation
RDK-60308 [RFC] RDK Coverity Defect Resolution for Device
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates RFC Manager startup to initialize logging via RDK Logger’s “extended” configuration API (behind RDK_LOGGER), instead of the prior rdk_logger_init() call.
Changes:
- Add conditional include of
rdk_logger.hwhenRDK_LOGGERis defined. - Replace logger initialization in
RFCManager::RFCManager()withrdk_logger_ext_init()using an explicit config struct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (rdk_logger_ext_init(&config) != RDK_SUCCESS) { | ||
| printf("RFC : ERROR - Extended logger init failed\n"); | ||
| } |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rfcMgr_gtest builds rfc_manager.cpp but the gtest Makefile does not link -lrdkloggers. Introducing a direct call to rdk_logger_ext_init() is therefore likely to break unit-test linking (the symbol is not provided anywhere in this repo). Consider guarding this call under #if !defined(GTEST_ENABLE) and/or providing a test stub, or update the gtest target’s link flags accordingly.
| /* Initialize RDK Logger */ | ||
| rdk_logger_init(0 == access(OVERIDE_DEBUG_INI_FILE, R_OK) ? OVERIDE_DEBUG_INI_FILE : DEBUG_INI_FILE); | ||
|
|
||
| static char RFCMGRLOG[] = "LOG.RDK.RFCMGR"; |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static char RFCMGRLOG[] = "LOG.RDK.RFCMGR"; is not modified anywhere and can be static const char* (or constexpr const char[]) to avoid exposing a writable buffer unnecessarily.
| static char RFCMGRLOG[] = "LOG.RDK.RFCMGR"; | |
| static constexpr char RFCMGRLOG[] = "LOG.RDK.RFCMGR"; |
| rdk_logger_ext_config_t config = { | ||
| .pModuleName = RFCMGRLOG, /* Module name */ | ||
| .loglevel = RDK_LOG_INFO, /* Default log level */ | ||
| .output = RDKLOG_OUTPUT_CONSOLE, /* Output to console (stdout/stderr) */ | ||
| .format = RDKLOG_FORMAT_WITH_TS, /* Timestamped format */ | ||
| .pFilePolicy = NULL /* Not using file output, so NULL */ | ||
| }; |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rdk_logger_ext_config_t config = { .pModuleName = ..., ... } uses C++ designated initializers. This component is built with -std=c++17 and -Werror (see rfcMgr/Makefile.am), so this will not compile on standard-conforming C++17 toolchains. Initialize config without designators (or default-construct then assign fields) to keep the build C++17-compatible.
| rdk_logger_ext_config_t config = { | |
| .pModuleName = RFCMGRLOG, /* Module name */ | |
| .loglevel = RDK_LOG_INFO, /* Default log level */ | |
| .output = RDKLOG_OUTPUT_CONSOLE, /* Output to console (stdout/stderr) */ | |
| .format = RDKLOG_FORMAT_WITH_TS, /* Timestamped format */ | |
| .pFilePolicy = NULL /* Not using file output, so NULL */ | |
| }; | |
| rdk_logger_ext_config_t config{}; | |
| config.pModuleName = RFCMGRLOG; /* Module name */ | |
| config.loglevel = RDK_LOG_INFO; /* Default log level */ | |
| config.output = RDKLOG_OUTPUT_CONSOLE; /* Output to console (stdout/stderr) */ | |
| config.format = RDKLOG_FORMAT_WITH_TS; /* Timestamped format */ | |
| config.pFilePolicy = NULL; /* Not using file output, so NULL */ |
No description provided.