mirror of https://github.com/decompals/wibo.git
Minor cppcheck lint fixes
This commit is contained in:
parent
4bf81a9ec9
commit
90101d8bc1
|
@ -2043,7 +2043,6 @@ static void *resolveByName(const char *name) {
|
||||||
if (strcmp(name, "InitOnceBeginInitialize") == 0) return (void *) kernel32::InitOnceBeginInitialize;
|
if (strcmp(name, "InitOnceBeginInitialize") == 0) return (void *) kernel32::InitOnceBeginInitialize;
|
||||||
if (strcmp(name, "AcquireSRWLockShared") == 0) return (void *) kernel32::AcquireSRWLockShared;
|
if (strcmp(name, "AcquireSRWLockShared") == 0) return (void *) kernel32::AcquireSRWLockShared;
|
||||||
if (strcmp(name, "ReleaseSRWLockShared") == 0) return (void *) kernel32::ReleaseSRWLockShared;
|
if (strcmp(name, "ReleaseSRWLockShared") == 0) return (void *) kernel32::ReleaseSRWLockShared;
|
||||||
if (strcmp(name, "ReleaseSRWLockShared") == 0) return (void *) kernel32::AcquireSRWLockShared;
|
|
||||||
if (strcmp(name, "AcquireSRWLockExclusive") == 0) return (void *) kernel32::AcquireSRWLockExclusive;
|
if (strcmp(name, "AcquireSRWLockExclusive") == 0) return (void *) kernel32::AcquireSRWLockExclusive;
|
||||||
if (strcmp(name, "ReleaseSRWLockExclusive") == 0) return (void *) kernel32::ReleaseSRWLockExclusive;
|
if (strcmp(name, "ReleaseSRWLockExclusive") == 0) return (void *) kernel32::ReleaseSRWLockExclusive;
|
||||||
if (strcmp(name, "TryAcquireSRWLockExclusive") == 0) return (void *) kernel32::TryAcquireSRWLockExclusive;
|
if (strcmp(name, "TryAcquireSRWLockExclusive") == 0) return (void *) kernel32::TryAcquireSRWLockExclusive;
|
||||||
|
|
|
@ -107,6 +107,7 @@ uint32_t read32(FILE *file) {
|
||||||
wibo::Executable::Executable() {
|
wibo::Executable::Executable() {
|
||||||
imageBuffer = nullptr;
|
imageBuffer = nullptr;
|
||||||
imageSize = 0;
|
imageSize = 0;
|
||||||
|
entryPoint = nullptr;
|
||||||
rsrcBase = 0;
|
rsrcBase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
6
main.cpp
6
main.cpp
|
@ -127,7 +127,8 @@ void wibo::freeModule(HMODULE module) { delete static_cast<ModuleInfo *>(module)
|
||||||
|
|
||||||
void *wibo::resolveFuncByName(HMODULE module, const char *funcName) {
|
void *wibo::resolveFuncByName(HMODULE module, const char *funcName) {
|
||||||
auto *info = static_cast<ModuleInfo *>(module);
|
auto *info = static_cast<ModuleInfo *>(module);
|
||||||
if (info && info->module && info->module->byName) {
|
assert(info);
|
||||||
|
if (info->module && info->module->byName) {
|
||||||
void *func = info->module->byName(funcName);
|
void *func = info->module->byName(funcName);
|
||||||
if (func)
|
if (func)
|
||||||
return func;
|
return func;
|
||||||
|
@ -137,7 +138,8 @@ void *wibo::resolveFuncByName(HMODULE module, const char *funcName) {
|
||||||
|
|
||||||
void *wibo::resolveFuncByOrdinal(HMODULE module, uint16_t ordinal) {
|
void *wibo::resolveFuncByOrdinal(HMODULE module, uint16_t ordinal) {
|
||||||
auto *info = static_cast<ModuleInfo *>(module);
|
auto *info = static_cast<ModuleInfo *>(module);
|
||||||
if (info && info->module && info->module->byOrdinal) {
|
assert(info);
|
||||||
|
if (info->module && info->module->byOrdinal) {
|
||||||
void *func = info->module->byOrdinal(ordinal);
|
void *func = info->module->byOrdinal(ordinal);
|
||||||
if (func)
|
if (func)
|
||||||
return func;
|
return func;
|
||||||
|
|
Loading…
Reference in New Issue