Project

General

Profile

Actions

Bug #1415

open

Type mismatch of lttng_ust_ring_buffer_ctx_init (int versus size_t)

Added by Joonhyung Hwang 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/16/2024
Due date:
% Done:

0%

Estimated time:

Description

Hello, we run static analysis tools for our code and saw the following message.

CERT-C Expression (CERT EXP37-C)
1. cert_exp37_c_violation: Calling function lttng_ust_ring_buffer_ctx_init(struct lttng_ust_ring_buffer_ctx *, void *, size_t, int, struct lttng_ust_probe_ctx *) with the argument __event_align, which has an incompatible type size_t instead of int.

The type of the fourth parameter of lttng_ust_ring_buffer_ctx_init() in include/lttng/ust-ringbuffer-context.h is int, but the fourth argument of lttng_ust_ring_buffer_ctx_init() in include/lttng/ust-tracepoint-event.h is __event_align whose type is int. I think we can make the types match by using size_t.

No data to display

Actions

Also available in: Atom PDF