summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--ext/bigdecimal/bigdecimal.c4
-rw-r--r--ext/digest/digest.c4
-rw-r--r--ext/digest/rmd160/rmd160ossl.c2
-rw-r--r--ext/digest/sha1/sha1ossl.c2
5 files changed, 19 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a7a281f6eb..cd34cddbf03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Tue Feb 27 18:59:42 2007 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_load): Silence warnings
+ regarding char * vs. unsigned char * mismatch; submitted by Lyle
+ Johnson <lyle.johnson@gmail.com> in [ruby-core:10416].
+
+ * ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto.
+
+ * ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto.
+
+ * ext/digest/digest.c (rb_digest_base_finish,
+ rb_digest_base_update): Ditto.
+
Tue Feb 27 18:12:05 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* enum.c (enum_take): new method. [ruby-dev:30407]
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 5a26ea79d95..efbf29f92d4 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -332,7 +332,7 @@ BigDecimal_load(VALUE self, VALUE str)
unsigned long m=0;
SafeStringValue(str);
- pch = RSTRING_PTR(str);
+ pch = (unsigned char *)RSTRING_PTR(str);
/* First get max prec */
while((*pch)!=(unsigned char)'\0' && (ch=*pch++)!=(unsigned char)':') {
if(!ISDIGIT(ch)) {
@@ -341,7 +341,7 @@ BigDecimal_load(VALUE self, VALUE str)
m = m*10 + (unsigned long)(ch-'0');
}
if(m>VpBaseFig()) m -= VpBaseFig();
- GUARD_OBJ(pv,VpNewRbClass(m,pch,self));
+ GUARD_OBJ(pv,VpNewRbClass(m,(char *)pch,self));
m /= VpBaseFig();
if(m && pv->MaxPrec>m) pv->MaxPrec = m+1;
return ToValue(pv);
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index c4a58cf3f6d..07484f897fc 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -519,7 +519,7 @@ rb_digest_base_update(VALUE self, VALUE str)
Data_Get_Struct(self, void, pctx);
StringValue(str);
- algo->update_func(pctx, RSTRING_PTR(str), RSTRING_LEN(str));
+ algo->update_func(pctx, (unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str));
return self;
}
@@ -537,7 +537,7 @@ rb_digest_base_finish(VALUE self)
Data_Get_Struct(self, void, pctx);
str = rb_str_new(0, algo->digest_len);
- algo->finish_func(pctx, RSTRING_PTR(str));
+ algo->finish_func(pctx, (unsigned char *)RSTRING_PTR(str));
/* avoid potential coredump caused by use of a finished context */
algo->init_func(pctx);
diff --git a/ext/digest/rmd160/rmd160ossl.c b/ext/digest/rmd160/rmd160ossl.c
index 5d8c5ba470a..f24e63e3d8f 100644
--- a/ext/digest/rmd160/rmd160ossl.c
+++ b/ext/digest/rmd160/rmd160ossl.c
@@ -4,5 +4,5 @@
#include "rmd160ossl.h"
void RMD160_Finish(RMD160_CTX *ctx, char *buf) {
- RIPEMD160_Final(buf, ctx);
+ RIPEMD160_Final((unsigned char *)buf, ctx);
}
diff --git a/ext/digest/sha1/sha1ossl.c b/ext/digest/sha1/sha1ossl.c
index adf5cf267cc..452cf35084c 100644
--- a/ext/digest/sha1/sha1ossl.c
+++ b/ext/digest/sha1/sha1ossl.c
@@ -6,5 +6,5 @@
void
SHA1_Finish(SHA1_CTX *ctx, char *buf)
{
- SHA1_Final(buf, ctx);
+ SHA1_Final((unsigned char *)buf, ctx);
}