Fix type mixing warnings.
authorJeremy Allison <jra@samba.org>
Wed, 1 Jun 2011 21:49:03 +0000 (14:49 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 1 Jun 2011 21:53:07 +0000 (23:53 +0200)
librpc/ndr/ndr_string.c

index cf4d972072a5a80b5574efb244332c925bb09c03..4510a71082ff8180833f4013287225c7bcceb3bf 100644 (file)
@@ -147,7 +147,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
        } else {
                if (!do_convert) {
                        as = talloc_strndup(ndr->current_mem_ctx,
-                                           ndr->data + ndr->offset,
+                                           (char *)ndr->data + ndr->offset,
                                            conv_src_len);
                        if (!as) {
                                return ndr_pull_error(ndr, NDR_ERR_ALLOC,
@@ -231,7 +231,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
 
        if (!do_convert) {
                d_len = s_len;
-               dest = talloc_strndup(ndr, s, s_len);
+               dest = (uint8_t *)talloc_strndup(ndr, s, s_len);
        } else if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len,
                                   (void **)(void *)&dest, &d_len))
        {