The 'class' identifier is a reserved word in the C++ language, while
development tools may combine C and C++ support and get confused. Avoid
conflicts, rename the variable to 'class_' in runtc.c source code.
const char *pd;
const char *pd_id;
int type;
const char *pd;
const char *pd_id;
int type;
int class_idx;
const char *outfile;
int outfd;
int class_idx;
const char *outfile;
int outfd;
/* Resolve selected decoder's class index, so we can match. */
dec = srd_decoder_get_by_id(pd->name);
/* Resolve selected decoder's class index, so we can match. */
dec = srd_decoder_get_by_id(pd->name);
if (op->type == SRD_OUTPUT_ANN)
l = dec->annotations;
else if (op->type == SRD_OUTPUT_BINARY)
if (op->type == SRD_OUTPUT_ANN)
l = dec->annotations;
else if (op->type == SRD_OUTPUT_BINARY)
idx = 0;
while (l) {
decoder_class = l->data;
idx = 0;
while (l) {
decoder_class = l->data;
- if (!strcmp(decoder_class[0], op->class)) {
+ if (!strcmp(decoder_class[0], op->class_)) {
op->class_idx = idx;
break;
}
op->class_idx = idx;
break;
}
}
if (op->class_idx == -1) {
ERR("Output class '%s' not found in decoder %s.",
}
if (op->class_idx == -1) {
ERR("Output class '%s' not found in decoder %s.",
- DBG("Class %s index is %d", op->class, op->class_idx);
+ DBG("Class %s index is %d", op->class_, op->class_idx);
}
sr_session_start(sr_sess);
}
sr_session_start(sr_sess);
op->pd = NULL;
op->pd_id = NULL;
op->type = -1;
op->pd = NULL;
op->pd_id = NULL;
op->type = -1;
op->class_idx = -1;
op->outfd = 1;
op->class_idx = -1;
op->outfd = 1;
usage(NULL);
}
if (opstr[2])
usage(NULL);
}
if (opstr[2])
- op->class = g_strdup(opstr[2]);
+ op->class_ = g_strdup(opstr[2]);
g_strfreev(opstr);
break;
case 'f':
g_strfreev(opstr);
break;
case 'f':