Author: dim
Date: Mon Feb  2 07:37:25 2015
New Revision: 278059
URL: https://svnweb.freebsd.org/changeset/base/278059

Log:
  MFC r277898:
  
  Fix a bunch of -Wcast-qual warnings in msdosfs_conv.c, by using
  __DECONST.  No functional change.

Modified:
  stable/10/sys/fs/msdosfs/msdosfs_conv.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/sys/fs/msdosfs/msdosfs_conv.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/10/sys/fs/msdosfs/msdosfs_conv.c
==============================================================================
--- stable/10/sys/fs/msdosfs/msdosfs_conv.c     Mon Feb  2 07:30:00 2015        
(r278058)
+++ stable/10/sys/fs/msdosfs/msdosfs_conv.c     Mon Feb  2 07:37:25 2015        
(r278059)
@@ -257,7 +257,7 @@ dos2unixfn(dn, un, lower, pmp)
         * Copy the name portion into the unix filename string.
         */
        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);
                while (*c != '\0') {
                        *un++ = *c++;
@@ -274,8 +274,8 @@ dos2unixfn(dn, un, lower, pmp)
                *un++ = '.';
                thislong++;
                for (i = 3; i > 0 && *dn != ' ';) {
-                       c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i,
-                           lower & LCASE_EXT, pmp);
+                       c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn),
+                           &i, lower & LCASE_EXT, pmp);
                        while (*c != '\0') {
                                *un++ = *c++;
                                thislong++;
@@ -629,7 +629,8 @@ winChkName(nbp, un, unlen, chksum, pmp)
                 * to look up or create files in case sensitive even when
                 * 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);
                if (c1 != c2)
                        return -2;
@@ -947,8 +948,8 @@ win2unixchr(u_char *outbuf, u_int16_t wc
                ilen = 2;
                olen = len = 4;
                inp = inbuf;
-               msdosfs_iconv->convchr(pmp->pm_w2u, (const char **)&inp, &ilen,
-                                    (char **)&outp, &olen);
+               msdosfs_iconv->convchr(pmp->pm_w2u, __DECONST(const char **,
+                   &inp), &ilen, (char **)&outp, &olen);
                len -= olen;
 
                /*
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to