summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2002-04-22 23:28:42 +0000
committergad <gad@FreeBSD.org>2002-04-22 23:28:42 +0000
commit3221843018420856d43b612319c6236f91198471 (patch)
tree240f7fc8e2cb10c0e56c24b4faf5d0052069a37e /usr.sbin/lpr
parent231257ddcfa7002fc173e630a249a59da6b95ad0 (diff)
downloadFreeBSD-src-3221843018420856d43b612319c6236f91198471.zip
FreeBSD-src-3221843018420856d43b612319c6236f91198471.tar.gz
Add 'const' to some casts to fix two warnings that are printed by the
new gcc (on sparc64). MFC after: 4 days
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/lpc/cmds.c4
-rw-r--r--usr.sbin/lpr/pac/pac.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index bc47046..b4a48ee 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -355,8 +355,8 @@ sortq(const void *a, const void *b)
const char *fname_a, *fname_b, *jnum_a, *jnum_b;
int cat_a, cat_b, ch, res, seq_a, seq_b;
- fname_a = (*(const struct dirent **)a)->d_name;
- fname_b = (*(const struct dirent **)b)->d_name;
+ fname_a = (*(const struct dirent * const *)a)->d_name;
+ fname_b = (*(const struct dirent * const *)b)->d_name;
/*
* First separate filenames into cagatories. Catagories are
diff --git a/usr.sbin/lpr/pac/pac.c b/usr.sbin/lpr/pac/pac.c
index f245fc3..c948f24 100644
--- a/usr.sbin/lpr/pac/pac.c
+++ b/usr.sbin/lpr/pac/pac.c
@@ -410,8 +410,8 @@ qucmp(const void *a, const void *b)
register const struct hent *h1, *h2;
register int r;
- h1 = *(const struct hent **)a;
- h2 = *(const struct hent **)b;
+ h1 = *(const struct hent * const *)a;
+ h2 = *(const struct hent * const *)b;
if (sort)
r = h1->h_feetpages < h2->h_feetpages ?
-1 : h1->h_feetpages > h2->h_feetpages;
OpenPOWER on IntegriCloud