diff options
author | gad <gad@FreeBSD.org> | 2001-07-15 00:09:46 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2001-07-15 00:09:46 +0000 |
commit | 75f5203b04d78ac555161bc219da58cbfeffefbd (patch) | |
tree | 72f0a137b622cd6dc694bb199a12a08fd1b19169 /usr.sbin/lpr/lpd/lpd.c | |
parent | c37f9bf14e59460fb949e607da4073e223e0972d (diff) | |
download | FreeBSD-src-75f5203b04d78ac555161bc219da58cbfeffefbd.zip FreeBSD-src-75f5203b04d78ac555161bc219da58cbfeffefbd.tar.gz |
Fix most of the warnings generated by compiling lpr with -Wnon-const-format,
often by just telling gcc that some internal routine is "__printflike"
(work done by Kris Kennaway <kris@FreeBSD.org>). Also fix the new warnings
which show up once gcc starts checking the "printf-like parameters" passed
to those routines.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/lpr/lpd/lpd.c')
-rw-r--r-- | usr.sbin/lpr/lpd/lpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index 866ab43..b48cf25 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -115,7 +115,7 @@ static void startup(void); static void chkhost(struct sockaddr *_f, int _ch_opts); static int ckqueue(struct printer *_pp); static void fhosterr(int _dosys, const char *_sysmsg, const char *_usermsg, - ...); + ...) __printf0like(3, 4); static int *socksetup(int _af, int _debuglvl); static void usage(void); @@ -512,7 +512,7 @@ doit(void) } status = getprintcap(printer, pp); if (status < 0) - fatal(pp, pcaperr(status)); + fatal(pp, "%s", pcaperr(status)); displayq(pp, cbuf[0] == CMD_SHOWQ_LONG); exit(0); case CMD_RMJOB: /* remove a job from the queue */ |