summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2009-08-22 06:30:34 -0700
committerMichael Gran <spk121@yahoo.com>2009-08-23 09:28:58 -0700
commit806f1ded951f92cdd3ed243daad5d97754568480 (patch)
treed2dafaa794310a36b5f87656f9c84aa922294341
parentc15d8e6ab9bf991ca55038fa895993bbb4c1efaa (diff)
downloadguile-806f1ded951f92cdd3ed243daad5d97754568480.tar.gz
Avoid type-punning warning in scm_gentemp
Int and size_t may not have the same storage size * libguile/deprecated.c (scm_gentemp): use size_t for string length
-rw-r--r--libguile/deprecated.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index 496bc2292..ed3a11eed 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -1075,7 +1075,8 @@ SCM_DEFINE (scm_gentemp, "gentemp", 0, 2, 0,
{
char buf[MAX_PREFIX_LENGTH + SCM_INTBUFLEN];
char *name = buf;
- int len, n_digits;
+ int n_digits;
+ size_t len;
scm_c_issue_deprecation_warning ("`gentemp' is deprecated. "
"Use `gensym' instead.");
@@ -1089,7 +1090,7 @@ SCM_DEFINE (scm_gentemp, "gentemp", 0, 2, 0,
{
SCM_VALIDATE_STRING (1, prefix);
len = scm_i_string_length (prefix);
- name = scm_to_locale_stringn (prefix, (size_t *)(&len));
+ name = scm_to_locale_stringn (prefix, &len);
name = scm_realloc (name, len + SCM_INTBUFLEN);
}