summaryrefslogtreecommitdiffstats
path: root/libtar
diff options
context:
space:
mode:
Diffstat (limited to 'libtar')
-rw-r--r--libtar/append.c3
-rw-r--r--libtar/basename.c2
-rw-r--r--libtar/block.c3
-rw-r--r--libtar/dirname.c2
-rw-r--r--libtar/extract.c3
-rw-r--r--libtar/handle.c2
6 files changed, 8 insertions, 7 deletions
diff --git a/libtar/append.c b/libtar/append.c
index 66e3aa1e7..8f09de262 100644
--- a/libtar/append.c
+++ b/libtar/append.c
@@ -416,8 +416,7 @@ int
tar_append_buffer(TAR *t, void *buf, size_t len)
{
char block[T_BLOCKSIZE];
- int filefd;
- int i, j;
+ int i;
size_t size = len;
for (i = size; i > T_BLOCKSIZE; i -= T_BLOCKSIZE)
diff --git a/libtar/basename.c b/libtar/basename.c
index 32108d613..3f4d31584 100644
--- a/libtar/basename.c
+++ b/libtar/basename.c
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: basename.c,v 1.4 1999/05/30 17:10:30 espie Exp $";
+//static char rcsid[] = "$OpenBSD: basename.c,v 1.4 1999/05/30 17:10:30 espie Exp $";
#endif /* not lint */
#include <errno.h>
diff --git a/libtar/block.c b/libtar/block.c
index d0adb2bcd..834c164ad 100644
--- a/libtar/block.c
+++ b/libtar/block.c
@@ -357,7 +357,8 @@ th_read(TAR *t)
if (*start == '2')
{
start++;
- if (start + sizeof(struct ext4_encryption_policy) != '\n')
+ char *newline_check = start + sizeof(struct ext4_encryption_policy);
+ if (*newline_check != '\n')
printf("did not find newline char in expected location, continuing anyway...\n");
memcpy(t->th_buf.eep, start, sizeof(struct ext4_encryption_policy));
#ifdef DEBUG
diff --git a/libtar/dirname.c b/libtar/dirname.c
index 4e060677e..31dbe13a8 100644
--- a/libtar/dirname.c
+++ b/libtar/dirname.c
@@ -28,7 +28,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: dirname.c,v 1.4 1999/05/30 17:10:30 espie Exp $";
+//static char rcsid[] = "$OpenBSD: dirname.c,v 1.4 1999/05/30 17:10:30 espie Exp $";
#endif /* not lint */
#include <errno.h>
diff --git a/libtar/extract.c b/libtar/extract.c
index fcd403a04..ea86c233b 100644
--- a/libtar/extract.c
+++ b/libtar/extract.c
@@ -12,6 +12,7 @@
#include <internal.h>
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include <sys/param.h>
@@ -227,7 +228,7 @@ tar_extract_regfile(TAR *t, const char *realname, const int *progress_fd)
if (mkdirhier(dirname(filename)) == -1)
return -1;
- printf(" ==> extracting: %s (file size %lld bytes)\n",
+ printf(" ==> extracting: %s (file size %" PRId64 " bytes)\n",
filename, size);
fdout = open(filename, O_WRONLY | O_CREAT | O_TRUNC
diff --git a/libtar/handle.c b/libtar/handle.c
index 28a7dc247..a26c094cc 100644
--- a/libtar/handle.c
+++ b/libtar/handle.c
@@ -32,7 +32,7 @@ static tartype_t default_type = { open, close, read, write };
static int
tar_init(TAR **t, const char *pathname, tartype_t *type,
- int oflags, int mode, int options)
+ int oflags, int mode __unused, int options)
{
if ((oflags & O_ACCMODE) == O_RDWR)
{