Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using
__DECONST. No functional change. MFC after: 3 days
This commit is contained in:
parent
9e55ea84e0
commit
07f28f1df7
@ -253,7 +253,7 @@ dos2unixfn(u_char dn[11], u_char *un, int lower, struct msdosfsmount *pmp)
|
|||||||
* Copy the name portion into the unix filename string.
|
* Copy the name portion into the unix filename string.
|
||||||
*/
|
*/
|
||||||
for (i = 8; i > 0 && *dn != ' ';) {
|
for (i = 8; i > 0 && *dn != ' ';) {
|
||||||
c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i,
|
c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i,
|
||||||
lower & LCASE_BASE, pmp);
|
lower & LCASE_BASE, pmp);
|
||||||
while (*c != '\0') {
|
while (*c != '\0') {
|
||||||
*un++ = *c++;
|
*un++ = *c++;
|
||||||
@ -270,8 +270,8 @@ dos2unixfn(u_char dn[11], u_char *un, int lower, struct msdosfsmount *pmp)
|
|||||||
*un++ = '.';
|
*un++ = '.';
|
||||||
thislong++;
|
thislong++;
|
||||||
for (i = 3; i > 0 && *dn != ' ';) {
|
for (i = 3; i > 0 && *dn != ' ';) {
|
||||||
c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i,
|
c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn),
|
||||||
lower & LCASE_EXT, pmp);
|
&i, lower & LCASE_EXT, pmp);
|
||||||
while (*c != '\0') {
|
while (*c != '\0') {
|
||||||
*un++ = *c++;
|
*un++ = *c++;
|
||||||
thislong++;
|
thislong++;
|
||||||
@ -612,7 +612,8 @@ winChkName(struct mbnambuf *nbp, const u_char *un, size_t unlen, int chksum,
|
|||||||
* to look up or create files in case sensitive even when
|
* to look up or create files in case sensitive even when
|
||||||
* it's a long file name.
|
* it's a long file name.
|
||||||
*/
|
*/
|
||||||
c1 = unix2winchr((const u_char **)&np, &len, LCASE_BASE, pmp);
|
c1 = unix2winchr(__DECONST(const u_char **, &np), &len,
|
||||||
|
LCASE_BASE, pmp);
|
||||||
c2 = unix2winchr(&un, &unlen, LCASE_BASE, pmp);
|
c2 = unix2winchr(&un, &unlen, LCASE_BASE, pmp);
|
||||||
if (c1 != c2)
|
if (c1 != c2)
|
||||||
return -2;
|
return -2;
|
||||||
@ -922,8 +923,8 @@ win2unixchr(u_char *outbuf, u_int16_t wc, struct msdosfsmount *pmp)
|
|||||||
ilen = 2;
|
ilen = 2;
|
||||||
olen = len = 4;
|
olen = len = 4;
|
||||||
inp = inbuf;
|
inp = inbuf;
|
||||||
msdosfs_iconv->convchr(pmp->pm_w2u, (const char **)&inp, &ilen,
|
msdosfs_iconv->convchr(pmp->pm_w2u, __DECONST(const char **,
|
||||||
(char **)&outp, &olen);
|
&inp), &ilen, (char **)&outp, &olen);
|
||||||
len -= olen;
|
len -= olen;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user