aboutsummaryrefslogtreecommitdiffstats
path: root/community/cpio/cast-arguments-to-printf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/cpio/cast-arguments-to-printf.patch')
-rw-r--r--community/cpio/cast-arguments-to-printf.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/community/cpio/cast-arguments-to-printf.patch b/community/cpio/cast-arguments-to-printf.patch
new file mode 100644
index 0000000000..f1eeabd757
--- /dev/null
+++ b/community/cpio/cast-arguments-to-printf.patch
@@ -0,0 +1,81 @@
+commit 3be097c12ec14a69b3f3df3e2138fa235a3154d7
+Author: Sergey Poznyakoff <gray@gnu.org>
+Date: Sat Dec 1 12:01:21 2018 +0200
+
+ Minor fixes
+
+ * src/copyin.c: Remove unused variable.
+ * src/util.c: Cast arguments to printf.
+
+diff --git a/src/copyin.c b/src/copyin.c
+index ba887ae..a01873d 100644
+--- a/src/copyin.c
++++ b/src/copyin.c
+@@ -844,14 +844,14 @@ from_ascii (char const *where, size_t digs, unsigned logbase)
+ char *p = strchr (codetab, toupper (*buf));
+ if (!p)
+ {
+- error (0, 0, _("Malformed number %.*s"), digs, where);
++ error (0, 0, _("Malformed number %.*s"), (int) digs, where);
+ break;
+ }
+
+ d = p - codetab;
+ if ((d >> logbase) > 1)
+ {
+- error (0, 0, _("Malformed number %.*s"), digs, where);
++ error (0, 0, _("Malformed number %.*s"), (int) digs, where);
+ break;
+ }
+ value += d;
+@@ -862,7 +862,7 @@ from_ascii (char const *where, size_t digs, unsigned logbase)
+ }
+ if (overflow)
+ error (0, 0, _("Archive value %.*s is out of range"),
+- digs, where);
++ (int) digs, where);
+ return value;
+ }
+
+diff --git a/src/util.c b/src/util.c
+index 4e49124..7303240 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -498,8 +498,9 @@ copy_files_disk_to_tape (int in_des, int out_des, off_t num_bytes,
+ filename, STRINGIFY_BIGINT (num_bytes, buf));
+ }
+ else
+- error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
+- original_num_bytes - num_bytes, filename);
++ error (0, 0,
++ _("Read error at byte %lld in file %s, padding with zeros"),
++ (long long) (original_num_bytes - num_bytes), filename);
+ write_nuls_to_file (num_bytes, out_des, tape_buffered_write);
+ break;
+ }
+@@ -548,8 +549,9 @@ copy_files_disk_to_disk (int in_des, int out_des, off_t num_bytes,
+ filename, STRINGIFY_BIGINT (num_bytes, buf));
+ }
+ else
+- error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
+- original_num_bytes - num_bytes, filename);
++ error (0, 0,
++ _("Read error at byte %lld in file %s, padding with zeros"),
++ (long long) (original_num_bytes - num_bytes), filename);
+ write_nuls_to_file (num_bytes, out_des, disk_buffered_write);
+ break;
+ }
+@@ -599,13 +601,11 @@ void
+ create_all_directories (char *name)
+ {
+ char *dir;
+- int mode;
+ #ifdef HPUX_CDF
+ int cdf;
+ #endif
+
+ dir = dir_name (name);
+- mode = 0700;
+ #ifdef HPUX_CDF
+ cdf = islastparentcdf (name);
+ if (cdf)