1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* dln.c (rb_w32_check_imported): suppress warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-10-12 14:53:59 +00:00
parent d410639a6d
commit abd94c3376

5
dln.c
View file

@ -1212,8 +1212,9 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine)
while (piat->u1.Function) { while (piat->u1.Function) {
PIMAGE_IMPORT_BY_NAME pii = (PIMAGE_IMPORT_BY_NAME)((char *)ext + (size_t)pint->u1.AddressOfData); PIMAGE_IMPORT_BY_NAME pii = (PIMAGE_IMPORT_BY_NAME)((char *)ext + (size_t)pint->u1.AddressOfData);
static const char prefix[] = "rb_"; static const char prefix[] = "rb_";
if (strncmp(pii->Name, prefix, sizeof(prefix) - 1) == 0) { const char *name = (const char *)pii->Name;
FARPROC addr = GetProcAddress(mine, pii->Name); if (strncmp(name, prefix, sizeof(prefix) - 1) == 0) {
FARPROC addr = GetProcAddress(mine, name);
if (addr) return (FARPROC)piat->u1.Function == addr; if (addr) return (FARPROC)piat->u1.Function == addr;
} }
piat++; piat++;