From 973ae30e7c4f7a1afb385dd3d8eeea178f981445 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Mon, 8 Jul 2024 13:24:39 +0200 Subject: fix deprecated prototypes --- src/qreceipt.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'src/qreceipt.c') diff --git a/src/qreceipt.c b/src/qreceipt.c index ee9fc52..9cdfb46 100644 --- a/src/qreceipt.c +++ b/src/qreceipt.c @@ -19,60 +19,59 @@ #define WHO "qreceipt" -void die_noreceipt() +static void die_noreceipt() { _exit(0); } -void die() +static void die() { _exit(100); } -void die_temp() +static void die_temp() { _exit(111); } -void die_nomem() +static void die_nomem() { buffer_putsflush(buffer_2, "qreceipt: fatal: out of memory\n"); die_temp(); } -void die_fork() +static void die_fork() { buffer_putsflush(buffer_2, "qreceipt: fatal: unable to fork\n"); die_temp(); } -void die_qqperm() +static void die_qqperm() { buffer_putsflush(buffer_2, "qreceipt: fatal: permanent qmail-queue error\n"); die(); } -void die_qqtemp() +static void die_qqtemp() { buffer_putsflush(buffer_2, "qreceipt: fatal: temporary qmail-queue error\n"); die_temp(); } -void die_usage() +static void die_usage() { buffer_putsflush(buffer_2, "qreceipt: usage: qreceipt deliveryaddress\n"); die(); } -void die_read() +static void die_read() { if (errno == ENOMEM) die_nomem(); buffer_putsflush(buffer_2, "qreceipt: fatal: read error\n"); die_temp(); } -void doordie(sa, r) stralloc *sa; -int r; +static void doordie(stralloc *sa, int r) { if (r == 1) return; if (r == -1) die_nomem(); @@ -89,7 +88,7 @@ char *returnpath; stralloc messageid = {0}; stralloc sanotice = {0}; -int rwnotice(token822_alloc *addr) +static int rwnotice(token822_alloc *addr) { token822_reverse(addr); if (token822_unquote(&sanotice, addr) != 1) die_nomem(); @@ -103,7 +102,7 @@ struct qmail qqt; stralloc quoted = {0}; -void finishheader() +static void finishheader() { char *qqx; @@ -150,7 +149,7 @@ token822_alloc hfin = {0}; token822_alloc hfrewrite = {0}; token822_alloc hfaddr = {0}; -void doheaderfield(stralloc *h) +static void doheaderfield(stralloc *h) { switch (hfield_known(h->s, h->len)) { case H_MESSAGEID: @@ -163,7 +162,7 @@ void doheaderfield(stralloc *h) } } -void dobody(stralloc *h) {} +static void dobody(stralloc *h) {} int main(int argc, char **argv) { -- cgit v1.2.3