void OnLoad(GlobalSettingsData data)
{
- IDESettings settings = (IDESettings)data;
#ifndef MAKEFILE_GENERATOR
+ IDESettings settings = (IDESettings)data;
globalSettingsDialog.ideSettings = settings;
ide.UpdateRecentMenus();
ide.UpdateCompilerConfigs(true);
{
#ifndef MAKEFILE_GENERATOR
return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isActive;
+#else
+ return false;
#endif
}
{
#ifndef MAKEFILE_GENERATOR
return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isPrepared;
+#else
+ return false;
#endif
}
strcat(string, ".dylib");
else
strcat(string, ".so");
- if(compiler.targetPlatform == tux && GetRuntimePlatform() == tux && moduleVersion && moduleVersion[0])
+ if(compiler.targetPlatform == tux && __runtimePlatform == tux && moduleVersion && moduleVersion[0])
{
strcat(string, ".");
strcat(string, moduleVersion);
bool loggedALine = false;
int lenMakeCommand = strlen(compiler.makeCommand);
int testLen = 0;
- const char * t, * s;
+ const char * t, * s, * s2;
char moduleName[MAX_FILENAME];
const char * gnuToolchainPrefix = compiler.gnuToolchainPrefix ? compiler.gnuToolchainPrefix : "";
const char * inFileIncludedFrom = strstr(line, stringInFileIncludedFrom);
const char * from = strstr(line, stringFrom);
test.copyLenSingleBlankReplTrim(line, ' ', true, testLen);
- if((t = strstr(line, (s=": recipe for target"))) && (t = strstr(t+strlen(s), (s=" failed"))) && (t+strlen(s))[0] == '\0')
+ if((t = strstr(line, (s=": recipe for target"))) && (t = strstr(t+strlen(s), (s2 = " failed"))) && (t+strlen(s2))[0] == '\0')
; // ignore this new gnu make error but what is it about?
else if(strstr(line, compiler.makeCommand) == line && line[lenMakeCommand] == ':')
{
if(module) module++;
if(module)
{
- byte * tokens[1];
+ char * tokens[1];
char * dashF = strstr(module, "-F ");
if(dashF)
{
numErrors++;
}
else if(compilingEC == 1 || (objDir && objDir == moduleName))
- continue;
+ {
+ bool skip = false;
+
+ // Filter out these warnings caused by eC generated C code:
+
+ // Declaration ordering bugs -- Awaiting topo sort implementation
+ if(strstr(line, "declared inside parameter list")) skip = true;
+ else if(strstr(line, "its scope is only this definition")) skip = true;
+ else if(strstr(line, "note: expected 'struct ") || strstr(line, "note: expected ‘struct "))
+ {
+ #define STRUCT_A "'struct "
+ #define STRUCT_B "‘struct "
+ char * struct1, * struct2, ch1, ch2;
+ struct1 = strstr(line, STRUCT_A);
+ if(struct1) { struct1 += sizeof(STRUCT_A)-1; } else { struct1 = strstr(line, STRUCT_B); struct1 += sizeof(STRUCT_B)-1; };
+
+ struct2 = strstr(struct1, STRUCT_A);
+ if(struct2) { struct2 += sizeof(STRUCT_A)-1; } else { struct2 = strstr(struct1, STRUCT_B); if(struct2) struct2 += sizeof(STRUCT_B)-1; };
+
+ if(struct1 && struct2)
+ {
+ while(ch1 = *(struct1++), ch2 = *(struct2++), ch1 && ch2 && (ch1 == '_' || isalnum(ch1)) && (ch2 == '_' || isalnum(ch2)));
+ if(ch1 == ch2)
+ skip = true;
+ }
+ }
+ // Pointers warnings (eC should already warn about relevant problems, more forgiving for function pointers, should cast in generated code)
+ else if((strstr(line, "note: expected '") || strstr(line, "note: expected ‘")) && strstr(line, "(*)")) skip = true;
+ else if(strstr(line, "expected 'void **") || strstr(line, "expected ‘void **")) skip = true;
+ else if(strstr(line, "from incompatible pointer type")) skip = true;
+ else if(strstr(line, "comparison of distinct pointer types lacks a cast")) skip = true;
+
+ // Things being defined for potential use -- Should mark as unused
+ else if(strstr(line, "unused variable") && (strstr(line, "'__") || strstr(line, "‘__") || strstr(line, "'class'") || strstr(line, "‘class’"))) skip = true;
+ else if(strstr(line, "defined but not used") && strstr(line, "__ecereProp")) skip = true;
+
+ // For preprocessed code from objidl.h (MinGW-w64 headers)
+ else if(strstr(line, "declaration does not declare anything")) skip = true;
+
+ // Location information that could apply to ignored warnings
+ else if(strstr(line, "In function '") || strstr(line, "In function ‘") ) skip = true;
+ else if(strstr(line, "At top level")) skip = true;
+ else if(strstr(line, "(near initialization for '") || strstr(line, "(near initialization for ‘")) skip = true;
+
+ if(skip) continue;
+ numWarnings++;
+ }
else if(strstr(line, "warning:"))
{
numWarnings++;
{
char fullModuleName[MAX_LOCATION];
FileAttribs found = 0;
- Project foundProject = this;
+ //Project foundProject = this;
if(moduleName[0])
{
char * loc = strstr(moduleName, ":");
found = FileExists(fullModuleName);
if(found)
{
- foundProject = prj;
+ //foundProject = prj;
break;
}
}
found = FileExists(fullModuleName);
if(found)
{
- foundProject = prj;
+ //foundProject = prj;
break;
}
}
{
if(f.GetExitCode() && !numErrors)
{
- bool result = f.GetLine(line, sizeof(line)-1);
+ /*bool result = */f.GetLine(line, sizeof(line)-1);
ide.outputView.buildBox.Logf($"Fatal Error: child process terminated unexpectedly\n");
}
else if(buildType != install)
char configName[MAX_LOCATION];
DirExpression objDirExp = GetObjDir(compiler, config, bitDepth);
PathBackup pathBackup { };
- bool crossCompiling = (compiler.targetPlatform != GetRuntimePlatform());
+ bool crossCompiling = (compiler.targetPlatform != __runtimePlatform);
const char * targetPlatform = crossCompiling ? (char *)compiler.targetPlatform : "";
bool eC_Debug = mode.eC_ToolsDebug;
}
else
{
- int len;
char pushD[MAX_LOCATION];
char cfDir[MAX_LOCATION];
GetIDECompilerConfigsDir(cfDir, true, true);
// Create object dir if it does not exist already
if(!FileExists(objDirExp.dir).isDirectory)
{
- sprintf(command, "%s CF_DIR=\"%s\"%s%s%s%s COMPILER=%s objdir -C \"%s\"%s -f \"%s\"",
+ sprintf(command, "%s CF_DIR=\"%s\"%s%s%s%s%s COMPILER=%s objdir -C \"%s\"%s -f \"%s\"",
compiler.makeCommand, cfDir,
crossCompiling ? " TARGET_PLATFORM=" : "",
targetPlatform,
if(compiler.type.isVC)
{
- bool result = false;
+ //bool result = false;
char oldwd[MAX_LOCATION];
GetWorkingDir(oldwd, sizeof(oldwd));
ChangeWorkingDir(topNode.path);
{
ProcessPipeOutputRaw(f);
delete f;
- result = true;
+ //result = true;
}
ChangeWorkingDir(oldwd);
}
char * compilerName;
DualPipe f;
PathBackup pathBackup { };
- bool crossCompiling = (compiler.targetPlatform != GetRuntimePlatform());
+ bool crossCompiling = (compiler.targetPlatform != __runtimePlatform);
const char * targetPlatform = crossCompiling ? (char *)compiler.targetPlatform : "";
compilerName = CopyString(compiler.name);
if(compiler.type.isVC)
{
- bool result = false;
+ //bool result = false;
char oldwd[MAX_LOCATION];
GetWorkingDir(oldwd, sizeof(oldwd));
ChangeWorkingDir(topNode.path);
{
ProcessPipeOutputRaw(f);
delete f;
- result = true;
+ //result = true;
}
ChangeWorkingDir(oldwd);
//return result;
char targetDirExpNoSpaces[MAX_LOCATION];
char fixedModuleName[MAX_FILENAME];
char fixedConfigName[MAX_FILENAME];
- int c, len;
+ int c;
int lenObjDirExpNoSpaces, lenTargetDirExpNoSpaces;
// Non-zero if we're building eC code
// We'll have to be careful with this when merging configs where eC files can be excluded in some configs and included in others
if(compilerConfigsDir && compilerConfigsDir[0])
{
strcpy(cfDir, compilerConfigsDir);
- if(cfDir && cfDir[0] && cfDir[strlen(cfDir)-1] != '/')
+ if(cfDir[0] && cfDir[strlen(cfDir)-1] != '/')
strcat(cfDir, "/");
}
else
void GenMakefilePrintMainObjectRule(File f, ProjectConfig config)
{
char extension[MAX_EXTENSION] = "c";
- char modulePath[MAX_LOCATION];
+ //char modulePath[MAX_LOCATION];
char fixedModuleName[MAX_FILENAME];
- DualPipe dep;
- char command[2048];
+ //DualPipe dep;
+ //char command[2048];
char objDirNoSpaces[MAX_LOCATION];
const String objDirExp = GetObjDirExpression(config);
char section[128];
char subSection[128];
char * equal;
- int len;
uint pos;
pos = f.Tell();
Project LegacyAsciiLoadProject(File f, const char * filePath)
{
Project project = null;
- ProjectNode node = null;
+ //ProjectNode node = null;
int pos;
char parentPath[MAX_LOCATION];
char section[128] = "";
child.type = file;
child.icon = NodeIcons::SelectFileIcon(child.name);
parent.files.Add(child);
- node = child;
+ //node = child;
//child = null;
}
else
PathCatSlash(parentPath, child.name);
parent.files.Add(child);
parent = child;
- node = child;
+ //node = child;
//child = null;
}
else if(!strcmpi(section, "Configurations"))
project.filePath = topNodePath;
parentPath[0] = '\0';
parent = project.topNode;
- node = parent;
+ //node = parent;
strcpy(section, "Target");
equal = &buffer[6];
if(equal[0] == ' ')
child.icon = archiveFile;
project.resNode = child;
parent = child;
- node = child;
+ //node = child;
strcpy(subSection, buffer);
}
else
if(!project)
{
JSONParser parser { f = f };
- JSONResult result = parser.GetObject(class(Project), &project);
+ /*JSONResult result = */parser.GetObject(class(Project), &project);
if(project)
{
char insidePath[MAX_LOCATION];
return project;
}
+#ifndef MAKEFILE_GENERATOR
static GccVersionInfo GetGccVersionInfo(CompilerConfig compiler, const String compilerCommand)
{
GccVersionInfo result = unknown;
return result;
}
};
+#endif