From 6e05502064a0a53a6cd91382fd8a1a1711b8a837 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 7 Aug 2015 22:32:49 -0700 Subject: C++ upkeep: conversions, clashes, warnings. * glob.c (glob_wrap): Fix signed/unsigned comparison. * stream.c (make_null_stream): Fix convert beign used where coerce is needed. * sysif.c (dup_wrap): Fix use of C++ new keyword. --- ChangeLog | 11 +++++++++++ glob.c | 2 +- stream.c | 2 +- sysif.c | 6 +++--- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ddfd2e3..b07d3f72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2015-08-07 Kaz Kylheku + + C++ upkeep: conversions, clashes, warnings. + + * glob.c (glob_wrap): Fix signed/unsigned comparison. + + * stream.c (make_null_stream): Fix convert beign used + where coerce is needed. + + * sysif.c (dup_wrap): Fix use of C++ new keyword. + 2015-08-07 Kaz Kylheku C++ static forward issue. diff --git a/glob.c b/glob.c index cfdb23f5..58b0d0e9 100644 --- a/glob.c +++ b/glob.c @@ -60,7 +60,7 @@ val glob_wrap(val pattern, val flags, val errfunc) s_errfunc ? errfunc_thunk : 0, &gl); { - int i; + size_t i; list_collect_decl (out, ptail); for (i = 0; i < gl.gl_pathc; i++) diff --git a/stream.c b/stream.c index cf5e2e8e..24620baf 100644 --- a/stream.c +++ b/stream.c @@ -285,7 +285,7 @@ val make_null_stream(void) { struct strm_base *s = coerce(struct strm_base *, chk_malloc(sizeof *s)); strm_base_init(s); - return cobj(convert(mem_t *, s), stream_s, &null_ops.cobj_ops); + return cobj(coerce(mem_t *, s), stream_s, &null_ops.cobj_ops); } struct stdio_handle { diff --git a/sysif.c b/sysif.c index 1be1903d..f8360a69 100644 --- a/sysif.c +++ b/sysif.c @@ -473,11 +473,11 @@ static val wifcontinued(val status) } #endif -static val dup_wrap(val old, val new) +static val dup_wrap(val old, val neu) { - if (missingp(new)) + if (missingp(neu)) return num(dup(c_num(old))); - return num(dup2(c_num(old), c_num(new))); + return num(dup2(c_num(old), c_num(neu))); } static val exec_wrap(val file, val args_opt) -- cgit v1.2.3