mirror of
https://github.com/wiiu-env/WUMSLoader.git
synced 2024-11-27 10:04:16 +01:00
Fix compiler warnings
This commit is contained in:
parent
e84b6f63bf
commit
44b65558ef
@ -144,7 +144,7 @@ class relocation_section_accessor_template
|
||||
Elf_Half& section) const
|
||||
{
|
||||
// Do regular job
|
||||
Elf_Word symbol;
|
||||
Elf_Word symbol = 0;
|
||||
bool ret = get_entry( index, offset, symbol, type, addend );
|
||||
|
||||
// Find the symbol
|
||||
|
@ -249,7 +249,7 @@ std::vector<RelocationData> ModuleDataFactory::getImportRelocationData(elfio &re
|
||||
break;
|
||||
}
|
||||
|
||||
uint32_t adjusted_sym_value = (uint32_t) sym_value;
|
||||
// uint32_t adjusted_sym_value = (uint32_t) sym_value;
|
||||
if(infoMap.count(sym_section_index) == 0){
|
||||
continue;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ std::vector<ModuleData> ModuleDataPersistence::loadModuleData(module_information
|
||||
|
||||
for (uint32_t j = 0; j < EXPORT_ENTRY_LIST_LENGTH; j++) {
|
||||
export_data_t *export_entry = &(module_data->export_entries[j]);
|
||||
if (export_entry->address == NULL) {
|
||||
if (export_entry->address == 0) {
|
||||
continue;
|
||||
}
|
||||
moduleData.addExportData(ExportData(static_cast<wums_entry_type_t>(export_entry->type), export_entry->name, reinterpret_cast<const void *>(export_entry->address)));
|
||||
@ -117,7 +117,7 @@ std::vector<ModuleData> ModuleDataPersistence::loadModuleData(module_information
|
||||
|
||||
for (uint32_t j = 0; j < HOOK_ENTRY_LIST_LENGTH; j++) {
|
||||
hook_data_t *hook_entry = &(module_data->hook_entries[j]);
|
||||
if (hook_entry->target == NULL) {
|
||||
if (hook_entry->target == 0) {
|
||||
continue;
|
||||
}
|
||||
moduleData.addHookData(HookData(static_cast<wums_hook_type_t>(hook_entry->type), reinterpret_cast<const void *>(hook_entry->target)));
|
||||
@ -125,7 +125,7 @@ std::vector<ModuleData> ModuleDataPersistence::loadModuleData(module_information
|
||||
|
||||
for (uint32_t j = 0; j < DYN_LINK_RELOCATION_LIST_LENGTH; j++) {
|
||||
dyn_linking_relocation_entry_t *linking_entry = &(module_data->linking_entries[j]);
|
||||
if (linking_entry->destination == NULL) {
|
||||
if (linking_entry->destination == 0) {
|
||||
break;
|
||||
}
|
||||
dyn_linking_import_t *importEntry = linking_entry->importEntry;
|
||||
|
@ -259,12 +259,12 @@ char *StringTools::str_replace(char *orig, char *rep, char *with) {
|
||||
if (len_rep == 0)
|
||||
return NULL; // empty rep causes infinite loop during count
|
||||
if (!with)
|
||||
with = "";
|
||||
with = (char *) "";
|
||||
len_with = strlen(with);
|
||||
|
||||
// count the number of replacements needed
|
||||
ins = orig;
|
||||
for (count = 0; tmp = strstr(ins, rep); ++count) {
|
||||
for (count = 0; (tmp = strstr(ins, rep)); ++count) {
|
||||
ins = tmp + len_rep;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user