From: Jelmer Vernooij Date: Mon, 9 Feb 2009 17:39:27 +0000 (+0100) Subject: Remove an invalid discard_const_p() - it masks an actual X-Git-Tag: samba-4.0.0alpha7~413 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39172b5ce91610773ecd5f4d6b2c7b25b5dfee5d;p=thirdparty%2Fsamba.git Remove an invalid discard_const_p() - it masks an actual bug in pidl where pidl uses "const" in a struct where there should not be const. There is only a single place in the Samba codebase where this triggers a warning. --- diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index b35762f025a..84752dac0de 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -2173,7 +2173,7 @@ sub ParseFunctionPull($$) if (grep(/in/, @{$e->{DIRECTION}})) { $self->pidl("memcpy(r->out.$e->{NAME}, r->in.$e->{NAME}, ($size) * sizeof(*r->in.$e->{NAME}));"); } else { - $self->pidl("memset(discard_const_p(struct $fn->{NAME} *, r->out.$e->{NAME}), 0, ($size) * sizeof(*r->out.$e->{NAME}));"); + $self->pidl("memset(r->out.$e->{NAME}, 0, ($size) * sizeof(*r->out.$e->{NAME}));"); } } else { $self->pidl("NDR_PULL_ALLOC($ndr, r->out.$e->{NAME});");