From 7c5e3348f7d4902ad8eb94d84a0a3595fbcd2ce2 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 1 Jun 2008 19:55:25 +0000 Subject: * suppress warnings on cygwin, mingw and mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 0e5e8704dc..501762a5ea 100644 --- a/file.c +++ b/file.c @@ -2614,7 +2614,7 @@ file_expand_path(VALUE fname, VALUE dname, VALUE result) if (s[0] == '~') { if (isdirsep(s[1]) || s[1] == '\0') { - char *dir = getenv("HOME"); + const char *dir = getenv("HOME"); if (!dir) { rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `%s'", s); @@ -2973,9 +2973,9 @@ static VALUE rb_file_s_basename(int argc, VALUE *argv) { VALUE fname, fext, basename; - char *name, *p; + const char *name, *p; #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC - char *root; + const char *root; #endif int f, n; @@ -3202,7 +3202,7 @@ rb_file_join(VALUE ary, VALUE sep) { long len, i; VALUE result, tmp; - char *name, *tail; + const char *name, *tail; if (RARRAY_LEN(ary) == 0) return rb_str_new(0, 0); @@ -4368,7 +4368,7 @@ static int path_check_0(VALUE path, int execpath) { struct stat st; - char *p0 = StringValueCStr(path); + const char *p0 = StringValueCStr(path); char *p = 0, *s; if (!is_absolute_path(p0)) { @@ -4462,8 +4462,8 @@ VALUE rb_get_load_path(void); int rb_find_file_ext(VALUE *filep, const char *const *ext) { - char *path, *found; - char *f = RSTRING_PTR(*filep); + const char *path, *found; + const char *f = RSTRING_PTR(*filep); VALUE fname, load_path; long i, j; @@ -4519,8 +4519,8 @@ VALUE rb_find_file(VALUE path) { VALUE tmp, load_path; - char *f = StringValueCStr(path); - char *lpath; + const char *f = StringValueCStr(path); + const char *lpath; char fbuf[MAXPATHLEN]; if (f[0] == '~') { -- cgit v1.2.3