netmail-open / wjelement

advanced, flexible JSON manipulation in C
GNU Lesser General Public License v3.0
108 stars 56 forks source link

Add a NULL initial value to doc into __WJEFromString() in element.c. #105

Closed joved-git closed 2 years ago

joved-git commented 2 years ago

Hello,

We have compilation problem when we want to use your lib in our project. Due to -Wall and -Werror flags, our compiler doesn't want uninitialized pointer but in element.c, we find a doc variable (WJElement doc) that is not really initialized (into __WJEFromString() ). To correct that, I simply added a "= NULL" on the declaration line of this variable.

Could you, please, consider this is good and accept the PR ?

Thanks a lot. Joël.

penduin commented 2 years ago

thanks for the patch! might I ask what your project is? (just out of curiosity)