[patch] Samba Janitorial work: non-const pointer in iconv.c

David Collier-Brown davecb at sun.com
Tue Jan 22 18:16:10 GMT 2008


In lib/iconv.c, we pass a non-const char ** pointer to iconv, and get
a warning from gcc.  The correction is:

------- iconv.c -------
--- /tmp/sccs.GTaO.X    Tue Jan 22 13:14:58 2008
+++ iconv.c     Tue Jan 22 13:10:16 2008
@@ -136,7 +136,7 @@
                        char **outbuf, size_t *outbytesleft)
 {
        size_t ret = iconv((iconv_t)cd,
-                          (char **)inbuf, inbytesleft,
+                          (const char **)inbuf, inbytesleft,
                           outbuf, outbytesleft);
        if (ret == (size_t)-1) {
                int saved_errno = errno;

--dave
-- 
David Collier-Brown            | Always do right. This will gratify
Sun Microsystems, Toronto      | some people and astonish the rest
davecb at sun.com                 |                      -- Mark Twain
(800) 555-9786 x56583 cell: (647) 833-9377 home off: (416) 223-5943 


More information about the samba-technical mailing list