aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-12-06 12:20:57 +0000
committervodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-12-06 12:20:57 +0000
commit3e518630f78a5267b0f062e072141317d273657e (patch)
treecf99677b533bc35ae3de0290d0849241984af6eb
parent7772c275be7480cb8424204debe5726fc4e9790a (diff)
downloadbusybox-w32-3e518630f78a5267b0f062e072141317d273657e.tar.gz
busybox-w32-3e518630f78a5267b0f062e072141317d273657e.tar.bz2
busybox-w32-3e518630f78a5267b0f062e072141317d273657e.zip
reduce 3 warning if compile with -W
git-svn-id: svn://busybox.net/trunk/busybox@12691 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--archival/tar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/archival/tar.c b/archival/tar.c
index e486f7fa3..0d3fb926c 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -322,6 +322,8 @@ static inline int exclude_file(const llist_t *excluded_files, const char *file)
322 322
323 return 0; 323 return 0;
324} 324}
325# else
326#define exclude_file(excluded_files, file) 0
325# endif 327# endif
326 328
327static int writeFileToTarball(const char *fileName, struct stat *statbuf, 329static int writeFileToTarball(const char *fileName, struct stat *statbuf,
@@ -449,6 +451,7 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
449 /* Avoid vfork clobbering */ 451 /* Avoid vfork clobbering */
450 (void) &include; 452 (void) &include;
451 (void) &errorFlag; 453 (void) &errorFlag;
454 (void) &zip_exec;
452# endif 455# endif
453 456
454 gzipPid = vfork(); 457 gzipPid = vfork();
@@ -463,7 +466,7 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
463 close(gzipStatusPipe[0]); 466 close(gzipStatusPipe[0]);
464 fcntl(gzipStatusPipe[1], F_SETFD, FD_CLOEXEC); /* close on exec shows sucess */ 467 fcntl(gzipStatusPipe[1], F_SETFD, FD_CLOEXEC); /* close on exec shows sucess */
465 468
466 execlp(zip_exec, zip_exec, "-f", 0); 469 execlp(zip_exec, zip_exec, "-f", NULL);
467 vfork_exec_errno = errno; 470 vfork_exec_errno = errno;
468 471
469 close(gzipStatusPipe[1]); 472 close(gzipStatusPipe[1]);
@@ -479,7 +482,7 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
479 482
480 if (n == 0 && vfork_exec_errno != 0) { 483 if (n == 0 && vfork_exec_errno != 0) {
481 errno = vfork_exec_errno; 484 errno = vfork_exec_errno;
482 bb_perror_msg_and_die("Could not exec %s",zip_exec); 485 bb_perror_msg_and_die("Could not exec %s", zip_exec);
483 } else if ((n < 0) && (errno == EAGAIN || errno == EINTR)) 486 } else if ((n < 0) && (errno == EAGAIN || errno == EINTR))
484 continue; /* try it again */ 487 continue; /* try it again */
485 break; 488 break;