fctrl = (ld10k1_ctl_dump_t *)ptr;
memset(ctrl, 0, sizeof(emu10k1_fx8010_control_gpr_t) * header->ctl_count);
for (i = 0; i < header->ctl_count; i++) {
- strcpy(ctrl[i].id.name, fctrl[i].name);
+ strcpy((char *)ctrl[i].id.name, fctrl[i].name);
ctrl[i].id.iface = EMU10K1_CTL_ELEM_IFACE_MIXER;
ctrl[i].id.index = fctrl[i].index;
ctrl[i].vcount = fctrl[i].vcount;
va_end(va);
}
-static void log(const char *fmt, ...)
+static void alog(const char *fmt, ...)
{
va_list va;
{
if (pidpath[0])
unlink(pidpath);
- log("Exiting daemon");
+ alog("Exiting daemon");
}
static void term_handler(int i)
pidfile = fopen(pidpath, "wt");
if (!pidfile) {
- log("%s: pidfile (%s)\n", strerror(errno), pidpath);
+ alog("%s: pidfile (%s)\n", strerror(errno), pidpath);
return 1;
}
dup2(fileno(logfile), fileno(stdout));
}
- log("Starting daemon");
+ alog("Starting daemon");
}
params.type = uses_pipe ? COMM_TYPE_LOCAL : COMM_TYPE_IP;
if (!add_ctrl)
return LD10K1_ERR_NO_MEM;
for (i = 0, item = dsp_mgr->add_ctl_list; item != NULL; item = item->next, i++) {
- strcpy(add_ctrl[i].id.name, item->ctl.name);
+ strcpy((char *)add_ctrl[i].id.name, item->ctl.name);
add_ctrl[i].id.iface = EMU10K1_CTL_ELEM_IFACE_MIXER;
add_ctrl[i].id.index = item->ctl.index;
add_ctrl[i].vcount = item->ctl.vcount;
if (!del_ids)
return LD10K1_ERR_NO_MEM;
for (i = 0, item = dsp_mgr->del_ctl_list; item != NULL; item = item->next, i++) {
- strcpy(del_ids[i].name, item->ctl.name);
+ strcpy((char *)del_ids[i].name, item->ctl.name);
del_ids[i].iface = EMU10K1_CTL_ELEM_IFACE_MIXER;
del_ids[i].index = item->ctl.index;
}
int allocgprcount = 0;
int allocinstrcount = 0;
unsigned int reserved[2];
- unsigned int res[2];
+ int res[2];
int reservedcount = 0;
int usedreserved = 0;
int ld10k1_fnc_name_rename(int data_conn, int op, int size)
{
ld10k1_fnc_name_t name_info;
- int ret;
int err;
ld10k1_patch_t *patch;
- ret = -1;
-
if ((err = receive_msg_data(data_conn, &name_info, sizeof(ld10k1_fnc_name_t))) < 0)
return err;
if (*ctrl_opt != ',') {
error("wrong ctrl option format - wrong separator beetwen subfunctions");
return 1;
- } else
- *ctrl_opt++;
+ } else {
+ ctrl_opt++;
+ }
}
}
if (*ctrl_opt != ',') {
error("wrong ctrl option format - wrong separator beetwen subfunctions");
return 1;
- } else
- *ctrl_opt++;
+ } else {
+ ctrl_opt++;
+ }
}
}
int opt_list;
int opt_setup;
- int opt_info;
int opt_add;
int opt_del;
int opt_con_add;
opt_add = 0;
opt_del = 0;
opt_list_patch = NULL;
- opt_info = 0;
opt_con_add = 0;
opt_con_del = 0;
opt_debug = 0;
opt_list_patch = optarg;
break;
case 'i':
- opt_info = 1;
+ /* nothing */
break;
case 'q':
opt_con_add = 1;