summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-01 19:55:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-01 19:55:25 +0000
commit7c5e3348f7d4902ad8eb94d84a0a3595fbcd2ce2 (patch)
treeb5ac3b9bccd8d1b669137035a316ba53a5b0e276 /file.c
parent5397015d2e8c904dfbce3cc4a0884c9cbb47d8b2 (diff)
* suppress warnings on cygwin, mingw and mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c18
1 files changed, 9 insertions, 9 deletions
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] == '~') {