Permalink
Browse files

Fixed lvalue error in udnl modules

this error produced by modern toolchains.
  • Loading branch information...
AKuHAK committed Jan 28, 2019
1 parent 7f5ef07 commit 32dcc2834c4a28f39f6d0f6587186e9dec7e6f67
Showing with 8 additions and 8 deletions.
  1. +4 −4 modules/iopcore/udnl-t300/udnl.c
  2. +4 −4 modules/iopcore/udnl/udnl.c
@@ -479,11 +479,11 @@ static void LoadIRXModule(const void *module, struct ModuleInfo *ModuleInfo)
ELF_hdr = (elf_header_t *)module;
ELF_phdr = (elf_pheader_t *)((unsigned int)module + ELF_hdr->phoff);

(unsigned int)ModuleInfo->gp += (unsigned int)ModuleInfo->text_start;
(unsigned int)ModuleInfo->EntryPoint += (unsigned int)ModuleInfo->text_start;
ModuleInfo->gp = ModuleInfo->gp + (unsigned int)ModuleInfo->text_start;
ModuleInfo->EntryPoint = ModuleInfo->EntryPoint +(unsigned int)ModuleInfo->text_start;

if (ModuleInfo->mod_id + 1 != 0) {
(unsigned int)ModuleInfo->mod_id += (unsigned int)ModuleInfo->text_start;
ModuleInfo->mod_id = ModuleInfo->mod_id + (unsigned int)ModuleInfo->text_start;
}

ELF_shdr = (elf_shdr_t *)((unsigned int)module + ELF_hdr->shoff);
@@ -714,7 +714,7 @@ static const struct ExtInfoField *GetFileInfo(const struct RomdirFileStat *stat,
return ExtInfoField;
}

(unsigned char *)ExtInfoField += ((ExtInfoHeader >> 16 & 0xFC) + 4);
ExtInfoField = ExtInfoField + ((ExtInfoHeader >> 16 & 0xFC) + 4);
}

return NULL;
@@ -391,11 +391,11 @@ static void LoadIRXModule(const void *module, struct ModuleInfo *ModuleInfo)
ELF_hdr = (elf_header_t *)module;
ELF_phdr = (elf_pheader_t *)((unsigned int)module + ELF_hdr->phoff);

(unsigned int)ModuleInfo->gp += (unsigned int)ModuleInfo->text_start;
(unsigned int)ModuleInfo->EntryPoint += (unsigned int)ModuleInfo->text_start;
ModuleInfo->gp = ModuleInfo->gp + (unsigned int)ModuleInfo->text_start;
ModuleInfo->EntryPoint = ModuleInfo->EntryPoint +(unsigned int)ModuleInfo->text_start;

if (ModuleInfo->mod_id + 1 != 0) {
(unsigned int)ModuleInfo->mod_id += (unsigned int)ModuleInfo->text_start;
ModuleInfo->mod_id = ModuleInfo->mod_id + (unsigned int)ModuleInfo->text_start;
}

ELF_shdr = (elf_shdr_t *)((unsigned int)module + ELF_hdr->shoff);
@@ -620,7 +620,7 @@ static const struct ExtInfoField *GetFileInfo(const struct RomdirFileStat *stat,
return ExtInfoField;
}

(unsigned char *)ExtInfoField += ((ExtInfoHeader >> 16 & 0xFC) + 4);
ExtInfoField = ExtInfoField + ((ExtInfoHeader >> 16 & 0xFC) + 4);
}

return NULL;

0 comments on commit 32dcc28

Please sign in to comment.