diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-15 01:17:50 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-15 01:17:50 +0000 |
commit | bc1918a7a278195709387fc586dbbf5a56867364 (patch) | |
tree | 6dd40b7c0e01bd8ab75ca7622aee1e6cd277ede4 | |
parent | 3cfebe44c7c7814e22362712b46f00b5636d0716 (diff) | |
download | busybox-w32-bc1918a7a278195709387fc586dbbf5a56867364.tar.gz busybox-w32-bc1918a7a278195709387fc586dbbf5a56867364.tar.bz2 busybox-w32-bc1918a7a278195709387fc586dbbf5a56867364.zip |
trivial fixes to make bbox compile with gcc 4.3.0
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 10 | ||||
-rw-r--r-- | shell/msh.c | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 54c8f7665..beaf3087f 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c | |||
@@ -217,9 +217,7 @@ char get_header_tar(archive_handle_t *archive_handle) | |||
217 | } | 217 | } |
218 | file_header->link_target = NULL; | 218 | file_header->link_target = NULL; |
219 | if (!linkname && parse_names && tar.linkname[0]) { | 219 | if (!linkname && parse_names && tar.linkname[0]) { |
220 | /* we trash magic[0] here, it's ok */ | 220 | file_header->link_target = xstrndup(tar.linkname, sizeof(tar.linkname)); |
221 | tar.linkname[sizeof(tar.linkname)] = '\0'; | ||
222 | file_header->link_target = xstrdup(tar.linkname); | ||
223 | /* FIXME: what if we have non-link object with link_target? */ | 221 | /* FIXME: what if we have non-link object with link_target? */ |
224 | /* Will link_target be free()ed? */ | 222 | /* Will link_target be free()ed? */ |
225 | } | 223 | } |
@@ -237,10 +235,12 @@ char get_header_tar(archive_handle_t *archive_handle) | |||
237 | file_header->name = NULL; | 235 | file_header->name = NULL; |
238 | if (!longname && parse_names) { | 236 | if (!longname && parse_names) { |
239 | /* we trash mode[0] here, it's ok */ | 237 | /* we trash mode[0] here, it's ok */ |
240 | tar.name[sizeof(tar.name)] = '\0'; | 238 | //tar.name[sizeof(tar.name)] = '\0'; - gcc 4.3.0 would complain |
239 | tar.mode[0] = '\0'; | ||
241 | if (tar.prefix[0]) { | 240 | if (tar.prefix[0]) { |
242 | /* and padding[0] */ | 241 | /* and padding[0] */ |
243 | tar.prefix[sizeof(tar.prefix)] = '\0'; | 242 | //tar.prefix[sizeof(tar.prefix)] = '\0'; - gcc 4.3.0 would complain |
243 | tar.padding[0] = '\0'; | ||
244 | file_header->name = concat_path_file(tar.prefix, tar.name); | 244 | file_header->name = concat_path_file(tar.prefix, tar.name); |
245 | } else | 245 | } else |
246 | file_header->name = xstrdup(tar.name); | 246 | file_header->name = xstrdup(tar.name); |
diff --git a/shell/msh.c b/shell/msh.c index fd4a54117..a96e799e2 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -588,7 +588,6 @@ static const struct builtincmd builtincmds[] = { | |||
588 | { NULL , NULL }, | 588 | { NULL , NULL }, |
589 | }; | 589 | }; |
590 | 590 | ||
591 | static struct op *scantree(struct op *); | ||
592 | static struct op *dowholefile(int /*, int*/); | 591 | static struct op *dowholefile(int /*, int*/); |
593 | 592 | ||
594 | 593 | ||
@@ -1278,6 +1277,7 @@ static int newfile(char *s) | |||
1278 | } | 1277 | } |
1279 | 1278 | ||
1280 | 1279 | ||
1280 | #ifdef UNUSED | ||
1281 | struct op *scantree(struct op *head) | 1281 | struct op *scantree(struct op *head) |
1282 | { | 1282 | { |
1283 | struct op *dotnode; | 1283 | struct op *dotnode; |
@@ -1309,6 +1309,7 @@ struct op *scantree(struct op *head) | |||
1309 | 1309 | ||
1310 | return NULL; | 1310 | return NULL; |
1311 | } | 1311 | } |
1312 | #endif | ||
1312 | 1313 | ||
1313 | 1314 | ||
1314 | static void onecommand(void) | 1315 | static void onecommand(void) |