fix some compiler warnings #74

Merged
Alexander_KS merged 3 commits from minor_fixes into master 2026-02-19 08:49:33 +03:00
4 changed files with 6 additions and 4 deletions
Showing only changes of commit 9dbbe9fcdc - Show all commits

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) if (adim[i].second - adim[i].first != bdim[i].second - bdim[i].first)
return false; 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()); auto it = symbolsForFunc.find(func->symbol()->identifier());
if (it != symbolsForFunc.end()) if (it != symbolsForFunc.end())

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
std::string correctSymbolModuleName(const std::string& origFull); 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 getModulesAndFunctions(SgFile* file, std::vector<SgStatement*>& modulesAndFunctions);
void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules); void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules);
std::map<std::string, std::set<std::string>> createMapOfModuleUses(SgFile* file); 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)) while (!feof(oldFile))
{ {
char buf[8192]; char buf[16384];
char *res = fgets(buf, 16384, oldFile); char *res = fgets(buf, sizeof(buf), oldFile);
if (res == NULL) if (res == NULL)
break; break;