Closed camarois closed 2 years ago
Hi @camarois.
Thank you for reporting this.
Are you using clang or gcc, and could you provide the versions? Or let me know if you are using the defaults from the build-essential
.
Filed internally as 128184.
It's gcc 9.3.0.
Hi @kinyoklion , any idea on the ETA for this issue?
Hello @camarois, this issue is in the backlog, but there is not an ETA.
Some additional detail.
We include -Wall
and -Werror
in our default compiler arguments. Interestingly this warning only surfaces with the addition of -O3
, and dropping down to -O2
and it goes away.
Hi @camarois, thank you for your patience! This issue has been resolved in release 2.4.3. Please do let us know if you are still having issues.
Describe the bug When running cmake with -Werror, I get
-Werror=maybe-uninitialized
at a couple of places in client.c and event_processor.c.Expected behavior That these variables be initialized.
Logs This is my diff file fixing the uninitialized variables.
diff --git a/src/client.c b/src/client.c index 442d486..21de277 100644 --- a/src/client.c +++ b/src/client.c @@ -956,7 +956,7 @@ LDStringVariationDetail( LDVariationDetails *const details) { size_t resultLength;
char * value;
char value = NULL; struct LDStoreNode selected;
LD_ASSERT_API(client); @@ -986,7 +986,7 @@ LDStringVariation( const size_t bufferSize) { size_t resultLength;
char * value;
char * value = NULL;
LD_ASSERT_API(client); LD_ASSERT_API(key); @@ -1009,7 +1009,7 @@ LDStringVariationAllocDetail( const char const fallback, LDVariationDetails const details) {
char * value;
char value = NULL; struct LDStoreNode selected;
LD_ASSERT_API(client); @@ -1032,7 +1032,7 @@ LDStringVariationAlloc( const char const key, const char const fallback) {
char *value;
char *value = NULL;
LD_ASSERT_API(client); LD_ASSERT_API(key); diff --git a/src/event_processor.c b/src/event_processor.c index 514acb3..ac30e6c 100644 --- a/src/event_processor.c +++ b/src/event_processor.c @@ -713,6 +713,8 @@ LDi_valueToJSON(const void const value, const LDJSONType valueType) { struct LDJSON tmp;
tmp = NULL;
LD_ASSERT(value);
switch (valueType) {
SDK version 2.3.1
OS/platform Ubuntu 20.04