s3:utils: Initialize row variable in wspsearch
authorAndreas Schneider <asn@samba.org>
Thu, 26 Oct 2023 12:09:33 +0000 (14:09 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 27 Oct 2023 05:54:33 +0000 (05:54 +0000)
../../source3/utils/wspsearch.c:331:25: error: ‘row’ may be used
uninitialized [-Werror=maybe-uninitialized]
  331 |         *rows_processed = row;
      |         ~~~~~~~~~~~~~~~~^~~~~

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/utils/wspsearch.c

index 3650fe12f343bb01671d1dc13842c3dd8fc1d859..aa088f7c13afd0c94034c64466395569e6f536fe 100644 (file)
@@ -256,7 +256,7 @@ static NTSTATUS print_rowsreturned(
                                uint32_t *rows_processed)
 {
        NTSTATUS status;
-       int row;
+       uint32_t row = 0;
        TALLOC_CTX *local_ctx = NULL;
        struct wsp_cbasestoragevariant **rowsarray = NULL;
        enum ndr_err_code err;