svn commit: trunk/busybox: archival/libunarchive shell
vda at busybox.net
vda at busybox.net
Mon Apr 14 18:17:51 PDT 2008
Author: vda
Date: 2008-04-14 18:17:50 -0700 (Mon, 14 Apr 2008)
New Revision: 21735
Log:
trivial fixes to make bbox compile with gcc 4.3.0
Modified:
trunk/busybox/archival/libunarchive/get_header_tar.c
trunk/busybox/shell/msh.c
Changeset:
Modified: trunk/busybox/archival/libunarchive/get_header_tar.c
===================================================================
--- trunk/busybox/archival/libunarchive/get_header_tar.c 2008-04-14 19:56:46 UTC (rev 21734)
+++ trunk/busybox/archival/libunarchive/get_header_tar.c 2008-04-15 01:17:50 UTC (rev 21735)
@@ -217,9 +217,7 @@
}
file_header->link_target = NULL;
if (!linkname && parse_names && tar.linkname[0]) {
- /* we trash magic[0] here, it's ok */
- tar.linkname[sizeof(tar.linkname)] = '\0';
- file_header->link_target = xstrdup(tar.linkname);
+ file_header->link_target = xstrndup(tar.linkname, sizeof(tar.linkname));
/* FIXME: what if we have non-link object with link_target? */
/* Will link_target be free()ed? */
}
@@ -237,10 +235,12 @@
file_header->name = NULL;
if (!longname && parse_names) {
/* we trash mode[0] here, it's ok */
- tar.name[sizeof(tar.name)] = '\0';
+ //tar.name[sizeof(tar.name)] = '\0'; - gcc 4.3.0 would complain
+ tar.mode[0] = '\0';
if (tar.prefix[0]) {
/* and padding[0] */
- tar.prefix[sizeof(tar.prefix)] = '\0';
+ //tar.prefix[sizeof(tar.prefix)] = '\0'; - gcc 4.3.0 would complain
+ tar.padding[0] = '\0';
file_header->name = concat_path_file(tar.prefix, tar.name);
} else
file_header->name = xstrdup(tar.name);
Modified: trunk/busybox/shell/msh.c
===================================================================
--- trunk/busybox/shell/msh.c 2008-04-14 19:56:46 UTC (rev 21734)
+++ trunk/busybox/shell/msh.c 2008-04-15 01:17:50 UTC (rev 21735)
@@ -588,7 +588,6 @@
{ NULL , NULL },
};
-static struct op *scantree(struct op *);
static struct op *dowholefile(int /*, int*/);
@@ -1278,6 +1277,7 @@
}
+#ifdef UNUSED
struct op *scantree(struct op *head)
{
struct op *dotnode;
@@ -1309,6 +1309,7 @@
return NULL;
}
+#endif
static void onecommand(void)
More information about the busybox-cvs
mailing list