Skip to content

Commit

Permalink
Merge pull request #2354 from ZhouBox/v2.10
Browse files Browse the repository at this point in the history
[v2.10]fix:build error when using a higher version of the compiler
  • Loading branch information
fengzeroz authored Dec 27, 2024
2 parents 3cb7053 + f7a6599 commit 4c564e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/otel/otel_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,8 @@ void neu_otel_scope_set_status_code(neu_otel_scope_ctx ctx,
scope->span->status =
calloc(1, sizeof(Opentelemetry__Proto__Trace__V1__Status));
opentelemetry__proto__trace__v1__status__init(scope->span->status);
scope->span->status->code = code;
scope->span->status->code =
(Opentelemetry__Proto__Trace__V1__Status__StatusCode) code;
scope->span->status->message = strdup(desc);
}

Expand All @@ -893,7 +894,8 @@ void neu_otel_scope_set_status_code2(neu_otel_scope_ctx ctx,
opentelemetry__proto__trace__v1__status__init(scope->span->status);
char *error_buf = calloc(1, 16);
sprintf(error_buf, "%d", errorno);
scope->span->status->code = code;
scope->span->status->code =
(Opentelemetry__Proto__Trace__V1__Status__StatusCode) code;
scope->span->status->message = error_buf;
}

Expand Down

0 comments on commit 4c564e0

Please sign in to comment.