I get the following error reported by Valgrind:
==19634== Conditional jump or move depends on uninitialised value(s)
==19634== at 0x4C2E2D0: __strcmp_sse42 (vg_replace_strmem.c:852)
==19634== by 0x400908: main
For what I assume is the use of strcmp. However, I do not know what unintialised values are used as I set values for both inputs. here is a snippet of code where I show you the values are not unintialised:
53 strncpy(cmp1,sub,k-1); // first k - 1 of the new substring
54 strncpy(cmp2,last->key + 1,k-1); // last k -1 of the previous/last substring
55 if (strcmp(cmp1,cmp2) == 0)
I assign values to both cmp1 and cmp2 before, and then use strcmp. So, I am wondering what the issue is?
Edit: Please let me know if you would like more code to be shown.