[Untested] fixed the compiler/linter options and fixed the corresponding code.

the code fixes have not been tested. some are trivial orthers might be a bit worrying.
This commit is contained in:
Marc
2022-10-05 13:55:04 +02:00
parent 561a2a90b8
commit 635b1adcaf
11 changed files with 40 additions and 35 deletions
-1
View File
@@ -90,7 +90,6 @@ static int parseConditionFlags(FOModPlugin_t * plugin, xmlNodePtr nodeElement) {
}
static int parseGroupFiles(FOModPlugin_t * plugin, xmlNodePtr nodeElement) {
FOModFile_t * files = NULL;
xmlNodePtr fileNode = nodeElement->children;
while(fileNode != NULL) {
if(!validateNode(&fileNode, true, "folder", "file", NULL)) {
+2 -2
View File
@@ -8,12 +8,12 @@
void freeFOMod(FOMod_t * fomod) {
for(int i = 0; i < fomod->condFilesCount; i++) {
FOModCondFile_t * condFile = &(fomod->condFiles[i]);
for(int fileId = 0; fileId < condFile->fileCount; fileId++) {
for(long fileId = 0; fileId < condFile->fileCount; fileId++) {
free(condFile->files[fileId].destination);
free(condFile->files[fileId].source);
}
for(int flagId = 0; flagId < condFile->flagCount; flagId++) {
for(long flagId = 0; flagId < condFile->flagCount; flagId++) {
FOModFlag_t * flag = &(condFile->requiredFlags[flagId]);
free(flag->name);
free(flag->value);