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:
Beat Küng
2017-03-29 18:47:20 +02:00
committed by Lorenz Meier
parent 4a7e02c640
commit 358bcb6ae0
3 changed files with 17 additions and 4 deletions
+3
View File
@@ -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();
}
+1 -1
View File
@@ -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()