summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 14:53:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 14:53:59 +0000
commitabd94c3376f9060464cc4e948071002d0f9d17ac (patch)
tree9a50ff0a83e25122d903313c283fedaff1a043e0 /dln.c
parentd410639a6d422e0ae032f049ccfbbbb45b312d6f (diff)
* 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
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dln.c b/dln.c
index e9bfff2..bb41f66 100644
--- a/dln.c
+++ b/dln.c
@@ -1212,8 +1212,9 @@ rb_w32_check_imported(HMODULE ext, HMODULE mine)
while (piat->u1.Function) {
PIMAGE_IMPORT_BY_NAME pii = (PIMAGE_IMPORT_BY_NAME)((char *)ext + (size_t)pint->u1.AddressOfData);
static const char prefix[] = "rb_";
- if (strncmp(pii->Name, prefix, sizeof(prefix) - 1) == 0) {
- FARPROC addr = GetProcAddress(mine, pii->Name);
+ const char *name = (const char *)pii->Name;
+ if (strncmp(name, prefix, sizeof(prefix) - 1) == 0) {
+ FARPROC addr = GetProcAddress(mine, name);
if (addr) return (FARPROC)piat->u1.Function == addr;
}
piat++;