Mostly fix unsigned expression and implicit conversion.
URCU still shows warnings but irrelevant.
Signed-off-by: David Goulet <dgoulet@efficios.com>
int event_ust_enable_all_tracepoints(struct ltt_ust_session *usess, int domain,
struct ltt_ust_channel *uchan)
{
- int ret, i;
- size_t size;
+ int ret, i, size;
struct lttng_ht_iter iter;
struct ltt_ust_event *uevent = NULL;
struct lttng_event *events = NULL;
int event_ust_disable_all_tracepoints(struct ltt_ust_session *usess, int domain,
struct ltt_ust_channel *uchan)
{
- int ret, i;
- size_t size;
+ int ret, i, size;
struct lttng_ht_iter iter;
struct ltt_ust_event *uevent = NULL;
struct lttng_event *events = NULL;
}
case LTTNG_LIST_CHANNELS:
{
- size_t nb_chan;
+ int nb_chan;
struct lttng_channel *channels;
nb_chan = cmd_list_channels(cmd_ctx->lsm->domain.type,
int ret;
gid_t gid;
- gid = allowed_group();
- if (gid < 0) {
+ ret = allowed_group();
+ if (ret < 0) {
WARN("No tracing group detected");
ret = 0;
goto end;
}
+ gid = ret;
+
/* Set lttng run dir */
ret = chown(rundir, 0, gid);
if (ret < 0) {
luc->attr.num_subbuf = chan->attr.num_subbuf;
luc->attr.switch_timer_interval = chan->attr.switch_timer_interval;
luc->attr.read_timer_interval = chan->attr.read_timer_interval;
- luc->attr.output = chan->attr.output;
+ luc->attr.output = (enum lttng_ust_output) chan->attr.output;
/* Translate to UST output enum */
switch (luc->attr.output) {
}
memcpy(tmp[count].name, uiter.name, LTTNG_UST_SYM_NAME_LEN);
tmp[count].loglevel = uiter.loglevel;
- tmp[count].type = LTTNG_UST_TRACEPOINT;
+ tmp[count].type = (enum lttng_event_type) LTTNG_UST_TRACEPOINT;
tmp[count].pid = app->pid;
tmp[count].enabled = -1;
count++;
/* Iterate over all the context types given */
cds_list_for_each_entry(type, &ctx_type_list.head, list) {
- context.ctx = type->opt->ctx_type;
+ context.ctx = (enum lttng_event_context_type) type->opt->ctx_type;
if (context.ctx == LTTNG_EVENT_CONTEXT_PERF_COUNTER) {
context.u.perf_counter.type = type->opt->u.perf.type;
context.u.perf_counter.config = type->opt->u.perf.config;
static
int child_run_as(void *_data)
{
+ int ret;
struct run_as_data *data = _data;
- size_t writelen, writeleft, index;
+ ssize_t writelen;
+ size_t writeleft, index;
union {
int i;
char c[sizeof(int)];
} sendret;
- int ret;
/*
* Child: it is safe to drop egid and euid while sharing the