]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli ldap tests: remove use of zero length array
authorGary Lockyer <gary@catalyst.net.nz>
Mon, 22 Jun 2020 01:42:56 +0000 (13:42 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 23 Jun 2020 02:15:35 +0000 (02:15 +0000)
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 <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jun 23 02:15:35 UTC 2020 on sn-devel-184

libcli/ldap/tests/ldap_message_test.c

index c5aacd4bc6b1296fc3f5fb4e116515e0d77663e3..f4b49bc47bcbe8c666e4880dabb81785cba46a4e 100644 (file)
@@ -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,