summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-12 12:23:10 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-12 12:23:10 +0000
commit1c1ad3e210cb4ddef1f1aa72bc8e179a634e6169 (patch)
tree19916363c30c8deefc5d62703ece20f8a4bf24ef /ext
parent7ee685caa64aecfb047dc302dac893ba72a6db17 (diff)
downloadruby-1c1ad3e210cb4ddef1f1aa72bc8e179a634e6169.tar.gz
ruby-1c1ad3e210cb4ddef1f1aa72bc8e179a634e6169.tar.xz
ruby-1c1ad3e210cb4ddef1f1aa72bc8e179a634e6169.zip
avoid some warnings
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/depend2
-rw-r--r--ext/win32ole/win32ole.c19
2 files changed, 10 insertions, 11 deletions
diff --git a/ext/win32ole/depend b/ext/win32ole/depend
index 3b1d7e9a9..4bf5ab5b9 100644
--- a/ext/win32ole/depend
+++ b/ext/win32ole/depend
@@ -1 +1 @@
-win32ole.o : win32ole.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
+win32ole.o : win32ole.c $(hdrdir)/ruby.h $(hdrdir)/config.h $(hdrdir)/defines.h
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index a7738430e..09fafa30f 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -956,7 +956,7 @@ reg_enum_key(hkey, i)
DWORD i;
{
char buf[BUFSIZ];
- LONG size_buf = sizeof(buf);
+ DWORD size_buf = sizeof(buf);
FILETIME ft;
LONG err = RegEnumKeyEx(hkey, i, buf, &size_buf,
NULL, NULL, NULL, &ft);
@@ -2278,7 +2278,7 @@ ole_methods_sub(pOwnerTypeInfo, pTypeInfo, methods, mask)
char *pstr;
FUNCDESC *pFuncDesc;
VALUE method;
- DWORD i;
+ WORD i;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Fail to GetTypeAttr");
@@ -2345,8 +2345,8 @@ ole_methods(self,mask)
VALUE self;
int mask;
{
- int iVar;
- int count;
+ UINT iVar;
+ UINT count;
ITypeInfo *pTypeInfo;
HRESULT hr;
VALUE methods;
@@ -2661,7 +2661,6 @@ ole_typedesc2val(pTypeInfo, pTypeDesc, typedetails)
rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
return str;
}
- return Qnil;
}
/*
@@ -3573,7 +3572,7 @@ ole_method_sub(self, pOwnerTypeInfo, pTypeInfo, name)
TYPEATTR *pTypeAttr;
BSTR bstr;
FUNCDESC *pFuncDesc;
- DWORD i;
+ WORD i;
VALUE fname;
VALUE method = Qnil;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
@@ -3912,7 +3911,7 @@ static ole_method_event(pTypeInfo, method_index, method_name)
{
TYPEATTR *pTypeAttr;
HRESULT hr;
- DWORD i;
+ WORD i;
int flags;
HREFTYPE href;
ITypeInfo *pRefTypeInfo;
@@ -4640,7 +4639,7 @@ ary2ptr_dispparams(ary, pdispparams)
int i;
VALUE v;
VARIANT *pvar;
- for(i = 0; i < RARRAY(ary)->len && i < pdispparams->cArgs; i++) {
+ for(i = 0; i < RARRAY(ary)->len && (unsigned int) i < pdispparams->cArgs; i++) {
v = rb_ary_entry(ary, i);
pvar = &pdispparams->rgvarg[pdispparams->cArgs-i-1];
val2ptr_variant(v, pvar);
@@ -4766,7 +4765,7 @@ find_iid(ole, pitf, piid, ppTypeInfo)
struct oledata *pole;
unsigned int index;
unsigned int count;
- unsigned int type;
+ int type;
BSTR bstr;
char *pstr;
@@ -4875,7 +4874,7 @@ find_default_source(ole, piid, ppTypeInfo)
IDispatch *pDispatch;
ITypeInfo *pTypeInfo;
TYPEATTR *pTypeAttr;
- unsigned int i;
+ int i;
int iFlags;
HREFTYPE hRefType;