mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 17:00:34 +08:00
visibility.h: add #pragma GCC poison getenv setenv putenv
Just to make sure that it will never be used on NuttX. This is not an architectural limitation, just a memory optimization, since we call clearenv() on NuttX.
This commit is contained in:
@@ -370,6 +370,7 @@ void Logger::run_trampoline(int argc, char *argv[])
|
||||
PX4_ERR("alloc failed");
|
||||
|
||||
} else {
|
||||
#ifndef __PX4_NUTTX
|
||||
//check for replay mode
|
||||
const char *logfile = getenv(px4::replay::ENV_FILENAME);
|
||||
|
||||
@@ -377,6 +378,8 @@ void Logger::run_trampoline(int argc, char *argv[])
|
||||
logger_ptr->setReplayFile(logfile);
|
||||
}
|
||||
|
||||
#endif /* __PX4_NUTTX */
|
||||
|
||||
logger_ptr->run();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace px4
|
||||
namespace replay
|
||||
{
|
||||
|
||||
static const char *ENV_FILENAME = "replay"; ///< name for getenv()
|
||||
static const char __attribute__((unused)) *ENV_FILENAME = "replay"; ///< name for getenv()
|
||||
static const char __attribute__((unused)) *ENV_MODE = "replay_mode"; ///< name for getenv()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user