From: Gary Lockyer Date: Mon, 22 Jun 2020 01:42:56 +0000 (+1200) Subject: libcli ldap tests: remove use of zero length array X-Git-Tag: ldb-2.2.0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d701bc1518766f36b1c7a3a00a82485098a8ee3d;p=thirdparty%2Fsamba.git libcli ldap tests: remove use of zero length array libcli/ldap/tests/ldap_message_test.c defines a zero length array (uint8_t buf[0]), which is a GCC extension and breaks the build with some strict compilers like xlc. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14387 Signed-off-by: Gary Lockyer Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Jun 23 02:15:35 UTC 2020 on sn-devel-184 --- diff --git a/libcli/ldap/tests/ldap_message_test.c b/libcli/ldap/tests/ldap_message_test.c index c5aacd4bc6b..f4b49bc47bc 100644 --- a/libcli/ldap/tests/ldap_message_test.c +++ b/libcli/ldap/tests/ldap_message_test.c @@ -115,7 +115,7 @@ static void test_empty_input(void **state) struct asn1_data *asn1; struct ldap_message *ldap_msg; NTSTATUS status; - uint8_t buf[0]; + uint8_t *buf = NULL; size_t len = 0; struct ldap_request_limits limits = { .max_search_size = 256000,