@@ -634,8 +634,8 @@ ssize_t kshark_load_tep_records(struct kshark_context *kshark_ctx, int sd,
return -ENOMEM;
}
-static const int tepdata_get_event_id(struct kshark_data_stream *stream,
- const struct kshark_entry *entry)
+static int tepdata_get_event_id(struct kshark_data_stream *stream,
+ const struct kshark_entry *entry)
{
int event_id = KS_EMPTY_BIN;
struct tep_record *record;
@@ -727,8 +727,8 @@ static char *tepdata_get_event_name(struct kshark_data_stream *stream,
return buffer;
}
-static const int tepdata_get_pid(struct kshark_data_stream *stream,
- const struct kshark_entry *entry)
+static int tepdata_get_pid(struct kshark_data_stream *stream,
+ const struct kshark_entry *entry)
{
struct tep_record *record;
int pid = KS_EMPTY_BIN;
@@ -1054,8 +1054,8 @@ static char *tepdata_dump_entry(struct kshark_data_stream *stream,
return entry_str;
}
-static const int tepdata_find_event_id(struct kshark_data_stream *stream,
- const char *event_name)
+static int tepdata_find_event_id(struct kshark_data_stream *stream,
+ const char *event_name)
{
struct tep_event *event;
char *buffer, *system, *name;
@@ -142,8 +142,8 @@ typedef char *(*stream_get_str_func) (struct kshark_data_stream *,
const struct kshark_entry *);
/** A function type to be used by the method interface of the data stream. */
-typedef const int (*stream_get_int_func) (struct kshark_data_stream *,
- const struct kshark_entry *);
+typedef int (*stream_get_int_func) (struct kshark_data_stream *,
+ const struct kshark_entry *);
/** A function type to be used by the method interface of the data stream. */
typedef int (*stream_find_id_func) (struct kshark_data_stream *,
@@ -176,16 +176,16 @@ typedef kshark_event_field_format
const char *);
/** A function type to be used by the method interface of the data stream. */
-typedef const int (*stream_read_event_field) (struct kshark_data_stream *,
- const struct kshark_entry *,
- const char *,
- int64_t *);
+typedef int (*stream_read_event_field) (struct kshark_data_stream *,
+ const struct kshark_entry *,
+ const char *,
+ int64_t *);
/** A function type to be used by the method interface of the data stream. */
-typedef const int (*stream_read_record_field) (struct kshark_data_stream *,
- void *,
- const char *,
- int64_t *);
+typedef int (*stream_read_record_field) (struct kshark_data_stream *,
+ void *,
+ const char *,
+ int64_t *);
struct kshark_context;
@@ -69,8 +69,8 @@ bool KSHARK_INPUT_CHECK(const char *file, char **format)
return false;
}
-static const int get_pid(struct kshark_data_stream *stream,
- const struct kshark_entry *entry)
+static int get_pid(struct kshark_data_stream *stream,
+ const struct kshark_entry *entry)
{
return entry->pid;
}
@@ -71,8 +71,8 @@ bool KSHARK_INPUT_CHECK(const char *file, char **format)
return false;
}
-static const int get_pid(struct kshark_data_stream *stream,
- const struct kshark_entry *entry)
+static int get_pid(struct kshark_data_stream *stream,
+ const struct kshark_entry *entry)
{
return entry->pid;
}
Also fix clang build, which allow to execute Clang-Tidy and Clazy Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr> --- src/libkshark-tepdata.c | 12 ++++++------ src/libkshark.h | 20 ++++++++++---------- tests/test-input.c | 4 ++-- tests/test-input_ctrl.c | 4 ++-- 4 files changed, 20 insertions(+), 20 deletions(-)