summaryrefslogtreecommitdiff
path: root/src/cp.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-04 21:48:43 +0000
committerJim Meyering <jim@meyering.net>1993-04-04 21:48:43 +0000
commit223b1d7604929f85ef2ebdc5e9516573352ab5e3 (patch)
tree68fb8cc04cb78936f72bc48b765a29000caea3a4 /src/cp.c
parent9cf66fe2b19c3975d4f2e164f59a4377d5976d77 (diff)
downloadcoreutils-223b1d7604929f85ef2ebdc5e9516573352ab5e3.tar.xz
(copy, make_path, re_protect): Explicitly cast alloca return value to (char *).
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cp.c b/src/cp.c
index bfcf912f2..81efbf437 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -528,7 +528,7 @@ copy (src_path, dst_path, new_dst, device, ancestors)
char *tmp_backup = find_backup_file_name (dst_path);
if (tmp_backup == NULL)
error (1, 0, "virtual memory exhausted");
- dst_backup = alloca (strlen (tmp_backup) + 1);
+ dst_backup = (char *) alloca (strlen (tmp_backup) + 1);
strcpy (dst_backup, tmp_backup);
free (tmp_backup);
if (rename (dst_path, dst_backup))
@@ -831,13 +831,13 @@ make_path (const_dirpath, src_offset, mode, verbose_fmt_string,
char *tmp_dst_dirname; /* Leading path of `dirpath', malloc. */
char *dst_dirname; /* Leading path of `dirpath', alloca. */
- dirpath = alloca (strlen (const_dirpath) + 1);
+ dirpath = (char *) alloca (strlen (const_dirpath) + 1);
strcpy (dirpath, const_dirpath);
src = dirpath + src_offset;
tmp_dst_dirname = dirname (dirpath);
- dst_dirname = alloca (strlen (tmp_dst_dirname) + 1);
+ dst_dirname = (char *) alloca (strlen (tmp_dst_dirname) + 1);
strcpy (dst_dirname, tmp_dst_dirname);
free (tmp_dst_dirname);
@@ -950,7 +950,7 @@ re_protect (const_dst_path, src_offset, attr_list)
char *dst_path; /* A copy of CONST_DST_PATH we can change. */
char *src_path; /* The source name in `dst_path'. */
- dst_path = alloca (strlen (const_dst_path) + 1);
+ dst_path = (char *) alloca (strlen (const_dst_path) + 1);
strcpy (dst_path, const_dst_path);
src_path = dst_path + src_offset;