From 9b1663a5574182a66c6de8ad2fce7b3e4cbf277b Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 22 Jun 2013 15:03:33 +0100 Subject: [PATCH] progs: Fix a number of format-related errors. Picked up by the new `mLib' attribute machinery. --- progs/catcrypt.c | 4 ++-- progs/catsign.c | 4 ++-- progs/cc-enc.c | 4 ++-- progs/key.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/progs/catcrypt.c b/progs/catcrypt.c index 6e0db1d..f4d10c9 100644 --- a/progs/catcrypt.c +++ b/progs/catcrypt.c @@ -206,7 +206,7 @@ static int encrypt(int argc, char *argv[]) ofp = stdout; else if ((ofp = fopen(of, eo->wmode)) == 0) { die(EXIT_FAILURE, "couldn't open file `%s' for output: %s", - ofp, strerror(errno)); + of, strerror(errno)); } dstr_reset(&d); @@ -506,7 +506,7 @@ static int decrypt(int argc, char *argv[]) if ((ofp = fopen(of, "wb")) == 0) { if (f & f_progress) fprogress_done(&ff); die(EXIT_FAILURE, "couldn't open file `%s' for output: %s", - ofp, strerror(errno)); + of, strerror(errno)); } rfp = ofp; } else if ((rfp = tmpfile()) == 0) { diff --git a/progs/catsign.c b/progs/catsign.c index 48f8fcb..47a951e 100644 --- a/progs/catsign.c +++ b/progs/catsign.c @@ -437,7 +437,7 @@ static void sig_writesig(enc *e, sigmsg *s) { chunk_write(e, s->sig.buf, s->sig.len); } static void diechoke(const char *m, void *p) - { die(EXIT_FAILURE, "%s%s%s", p, p ? ": " : "", m); } + { die(EXIT_FAILURE, "%s%s%s", (const char *)p, p ? ": " : "", m); } static void sig_readheader(enc *e, sigmsg *s, void (*choke)(const char *, void *), void *p) @@ -536,7 +536,7 @@ static int sign(int argc, char *argv[]) ofp = stdout; else if ((ofp = fopen(of, eo->wmode)) == 0) { die(EXIT_FAILURE, "couldn't open file `%s' for output: %s", - ofp, strerror(errno)); + of, strerror(errno)); } /* --- Start the work --- */ diff --git a/progs/cc-enc.c b/progs/cc-enc.c index 61d9805..f4b6119 100644 --- a/progs/cc-enc.c +++ b/progs/cc-enc.c @@ -410,7 +410,7 @@ int cmd_encode(int argc, char *argv[]) ofp = stdout; else if ((ofp = fopen(of, eo->wmode)) == 0) { die(EXIT_FAILURE, "couldn't open file `%s' for output: %s", - ofp, strerror(errno)); + of, strerror(errno)); } e = initenc(eo, ofp, bd); @@ -492,7 +492,7 @@ int cmd_decode(int argc, char *argv[]) ofp = stdout; else if ((ofp = fopen(of, "wb")) == 0) { die(EXIT_FAILURE, "couldn't open file `%s' for output: %s", - ofp, strerror(errno)); + of, strerror(errno)); } e = initdec(eo, fp, checkbdry, (/*unconst*/ void *)bd); diff --git a/progs/key.c b/progs/key.c index f263aaf..fe5f313 100644 --- a/progs/key.c +++ b/progs/key.c @@ -290,7 +290,7 @@ static mp *getmp(key_data *k, const char *tag) if (!k) die(EXIT_FAILURE, "unexpected failure looking up subkey `%s'", tag); if ((k->e & KF_ENCMASK) != KENC_MP) - die(EXIT_FAILURE, "subkey `%s' has an incompatible type"); + die(EXIT_FAILURE, "subkey `%s' has an incompatible type", tag); return (k->u.m); } -- 2.11.0