From e1d0db8a51d250681d6f572f03e93320ed83440f Mon Sep 17 00:00:00 2001 From: Peter Ludemann Date: Tue, 5 Mar 2024 15:03:48 -0800 Subject: [PATCH] Ensure local variables are initialized (compiler warnings) --- libcds/tests/testLCP.cpp | 4 ++-- libcds/tests/testNPR.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libcds/tests/testLCP.cpp b/libcds/tests/testLCP.cpp index e6ca2311..18b0b87a 100644 --- a/libcds/tests/testLCP.cpp +++ b/libcds/tests/testLCP.cpp @@ -53,8 +53,8 @@ bool testLCP(LCP *s1, LCP *s2, TextIndex *csa){ int main(int argc, char *argv[]){ - char *text; - size_t length; + char *text = nullptr; + size_t length = 0; LCP *lcp_naive=NULL; LCP *lcp=NULL; diff --git a/libcds/tests/testNPR.cpp b/libcds/tests/testNPR.cpp index 8a4d9e01..ae03851c 100644 --- a/libcds/tests/testNPR.cpp +++ b/libcds/tests/testNPR.cpp @@ -71,8 +71,8 @@ bool testNPR(NPR *npr, LCP *lcp, TextIndex *csa, size_t *naive_nsv, size_t *nai int main(int argc, char *argv[]){ - char *text; - size_t length; + char *text = nullptr; + size_t length = 0; LCP *lcp = NULL; NPR *npr = NULL;