New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConfigMetadata ctor: code may be uninitialized #113
Comments
I think that this is spurious. I don't say that lightly, since last time I thought this warning was spurious, it turned out that I had made a nasty bug. Here's how I figure, though:
It's worth looking at more closely, and with different compilers, to be sure that this is spurious and not a symptom of a real issue somewhere (else) in the code. Maybe somewhere, |
Thank you for taking a look. I am definitely not an expert on this. In case it is indeed spurious, would it be correct to add |
This makes me think that it's a spurious error. I wonder if there's ever a place in the code where an {
Error error;
error.code = DATADOG_AGENT_NULL_HTTP_CLIENT;
error.message = "uh oh!";
} Or, more likely: {
Error error;
// stuff...
if (something(&error)) {
// use `error`
}
// ...
} I don't think that there's any code in the library written this way. If that's the case, then you might try Even if that works, I'm not sure that it is worth doing. See what Damien thinks. My goal with
|
EDIT: This only happens using gcc 12. When using gcc 13, the error disappears.
While trying to compile envoy v1.30.0 (with Bazel), I see an error that a variable may be uninitialized.
dd-trace-cpp/src/datadog/config.h
Line 50 in e576445
datadog::tracing::Error::code' may be used uninitialized [-Werror=maybe-uninitialized]
.The BUILD file sets strict compiler flags, leading to an error:
dd-trace-cpp/BUILD.bazel
Lines 120 to 124 in e576445
Details:
The text was updated successfully, but these errors were encountered: