Skip to content

Commit

Permalink
Merge pull request #249 from magiblot/uninitialized-values
Browse files Browse the repository at this point in the history
Fix some uninitialized values
  • Loading branch information
pinterf authored Dec 28, 2021
2 parents d94c1d4 + e378fd6 commit b61202a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion avs_core/core/PluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ void PluginManager::AddAutoloadDir(const std::string &dirPath, bool toFront)
GetModuleFileName(NULL, ExeFilePath, AVS_MAX_PATH);
#else // AVS_POSIX
std::string ExeFilePath;
char buf[PATH_MAX + 1];
char buf[PATH_MAX + 1] {};
#ifdef AVS_LINUX
if (readlink("/proc/self/exe", buf, sizeof(buf) - 1) != -1)
#elif defined(AVS_MACOS)
Expand Down
6 changes: 3 additions & 3 deletions avs_core/core/avisynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2222,7 +2222,9 @@ ScriptEnvironment::ScriptEnvironment()
FrontCache(NULL),
nTotalThreads(1),
nMaxFilterInstances(1),
graphAnalysisEnable(false)
graphAnalysisEnable(false),
LogLevel(LOGLEVEL_NONE),
cacheMode(CACHE_DEFAULT)
{
#ifdef XP_TLS
if(dwTlsIndex == 0)
Expand Down Expand Up @@ -2257,8 +2259,6 @@ ScriptEnvironment::ScriptEnvironment()
}
#endif



auto cpuDevice = Devices->GetCPUDevice();
threadEnv->GetTLS()->currentDevice = cpuDevice;

Expand Down
1 change: 1 addition & 0 deletions avs_core/core/parser/tokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Tokenizer::Tokenizer(Tokenizer* old)
{
pc = old->pc;
line = old->line;
type = old->type;
NextToken();
}

Expand Down

0 comments on commit b61202a

Please sign in to comment.