Skip to content

Commit afb5e55

Browse files
authored
Merge pull request #2355 from ZhouBox/main
fix:build error when using a higher version of the compiler
2 parents bc6eb48 + cea84c1 commit afb5e55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/otel/otel_manager.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,8 @@ void neu_otel_scope_set_status_code(neu_otel_scope_ctx ctx,
880880
scope->span->status =
881881
calloc(1, sizeof(Opentelemetry__Proto__Trace__V1__Status));
882882
opentelemetry__proto__trace__v1__status__init(scope->span->status);
883-
scope->span->status->code = code;
883+
scope->span->status->code =
884+
(Opentelemetry__Proto__Trace__V1__Status__StatusCode) code;
884885
scope->span->status->message = strdup(desc);
885886
}
886887

@@ -893,7 +894,8 @@ void neu_otel_scope_set_status_code2(neu_otel_scope_ctx ctx,
893894
opentelemetry__proto__trace__v1__status__init(scope->span->status);
894895
char *error_buf = calloc(1, 16);
895896
sprintf(error_buf, "%d", errorno);
896-
scope->span->status->code = code;
897+
scope->span->status->code =
898+
(Opentelemetry__Proto__Trace__V1__Status__StatusCode) code;
897899
scope->span->status->message = error_buf;
898900
}
899901

0 commit comments

Comments
 (0)