Avoid -Werror=address by skipping pointless _mg_buffer_zero()
commit6f21611755c2a34158439935f97806e0c84f8b84
authorAndrew Bartlett <abartlet@samba.org>
Wed, 25 Aug 2021 23:22:46 +0000 (26 11:22 +1200)
committerLuke Howard <lukeh@padl.com>
Wed, 25 Aug 2021 23:31:00 +0000 (26 09:31 +1000)
treeb9def311bcd2bdae781d4884c423f8de77f26038
parent3f7972e6bebe413cabb2bb61989009eaf32ea21b
Avoid -Werror=address by skipping pointless _mg_buffer_zero()

We do not need to zero out the local variable output_token
if we do not later call gss_release_buffer() on it.

This aovids a -Werror=address compile failure under the
strict compiler options Samba uses when compiled on Ubuntu
20.04 with gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

In file included from ../../source4/heimdal/lib/gssapi/preauth/pa_client.c:34:
../../source4/heimdal/lib/gssapi/preauth/pa_client.c:148:21: error: the address of ‘output_token’ will always evaluate as ‘true’ [-Werror=address]
  148 |     _mg_buffer_zero(&output_token);
      |                     ^
../../source4/heimdal/lib/gssapi/mech/mech_locl.h:72:7: note: in definition of macro ‘_mg_buffer_zero’
   72 |   if (buffer) {   \
      |       ^~~~~~

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
lib/gssapi/preauth/pa_client.c