Skip to content

Commit d4c8763

Browse files
committed
Ensure local variables are initialized (compiler warnings)
1 parent 91ea422 commit d4c8763

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

libcds/tests/testLCP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ bool testLCP(LCP *s1, LCP *s2, TextIndex *csa){
5353

5454

5555
int main(int argc, char *argv[]){
56-
char *text;
57-
size_t length;
56+
char *text = nullptr;
57+
size_t length = 0;
5858
LCP *lcp_naive=NULL;
5959
LCP *lcp=NULL;
6060

libcds/tests/testNPR.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ bool testNPR(NPR *npr, LCP *lcp, TextIndex *csa, size_t *naive_nsv, size_t *nai
7171

7272

7373
int main(int argc, char *argv[]){
74-
char *text;
75-
size_t length;
74+
char *text = nullptr;
75+
size_t length = 0;
7676
LCP *lcp = NULL;
7777
NPR *npr = NULL;
7878

0 commit comments

Comments
 (0)