summaryrefslogtreecommitdiffstats
path: root/libtar
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:36 +0200
committerEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:39 +0200
commit58f2132bc3954fc704787d477500a209eedb8e29 (patch)
treeeb0f79aacd68724b0c0c091018384ef924380f47 /libtar
parentRemove remaining pieces of supersu (diff)
parentSnap for 4745538 from 723056a83f8c8b15af02d9c302862dbb2304ea8c to pi-release (diff)
downloadandroid_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.gz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.bz2
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.lz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.xz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.zst
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.zip
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)
{