fix some compiler warnings

This commit is contained in:
2026-02-18 23:20:58 +03:00
committed by Oleg Nikitin
parent 4229041da4
commit 2a0cfdb68e
4 changed files with 6 additions and 4 deletions

View File

@@ -224,6 +224,8 @@ bool equalDims(const CommConstraint& a, const CommConstraint& b)
if (adim[i].second - adim[i].first != bdim[i].second - bdim[i].first)
return false;
}
return true;
}

View File

@@ -325,7 +325,7 @@ static void getModuleSymbols(SgStatement* func, set<SgSymbol*>& symbs)
}
}
const set<SgSymbol*>& getModuleSymbols(SgStatement *func)
set<SgSymbol*> getModuleSymbols(SgStatement *func)
{
auto it = symbolsForFunc.find(func->symbol()->identifier());
if (it != symbolsForFunc.end())

View File

@@ -1,7 +1,7 @@
#pragma once
std::string correctSymbolModuleName(const std::string& origFull);
const std::set<SgSymbol*>& getModuleSymbols(SgStatement* func);
std::set<SgSymbol*> getModuleSymbols(SgStatement* func);
void getModulesAndFunctions(SgFile* file, std::vector<SgStatement*>& modulesAndFunctions);
void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules);
std::map<std::string, std::set<std::string>> createMapOfModuleUses(SgFile* file);

View File

@@ -569,8 +569,8 @@ void copyIncludes(const set<string> &allIncludeFiles, const map<string, map<int,
while (!feof(oldFile))
{
char buf[8192];
char *res = fgets(buf, 16384, oldFile);
char buf[16384];
char *res = fgets(buf, sizeof(buf), oldFile);
if (res == NULL)
break;