Add 'const' to some casts to fix two warnings that are printed by the

new gcc (on sparc64).

MFC after:	4 days
This commit is contained in:
Garance A Drosehn 2002-04-22 23:28:42 +00:00
parent ac7d1b151c
commit f0baf66556
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95291
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;