@@ -361,7 +361,7 @@ void init_adl(int nDevs)
applog(LOG_INFO, "GPU %d %s hardware monitoring enabled", gpu, lpInfo[i].strAdapterName);
if (gpus[gpu].name)
- free(gpus[gpu].name);
+ free((void*)gpus[gpu].name);
gpus[gpu].name = lpInfo[i].strAdapterName;
gpus[gpu].has_adl = true;
/* Flag adl as active if any card is successfully activated */
@@ -469,7 +469,7 @@ static void icarus_shutdown(struct thr_info *thr)
icarus = thr->cgpu;
if (icarus->device_path)
- free(icarus->device_path);
+ free((void*)icarus->device_path);
icarus_close(icarus->device_fd);
@@ -3653,7 +3653,7 @@ void *miner_thread(void *userdata)
struct thr_info *mythr = userdata;
const int thr_id = mythr->id;
struct cgpu_info *cgpu = mythr->cgpu;
- struct device_api *api = cgpu->api;
+ const struct device_api *api = cgpu->api;
/* Try to cycle approximately 5 times before each log update */
const unsigned long def_cycle = opt_log_interval / 5 ? : 1;
@@ -191,8 +191,8 @@ struct thr_info;
struct work;
struct device_api {
- char*dname;
- char*name;
+ const char*dname;
+ const char*name;
// API-global functions
void (*api_detect)();
@@ -252,10 +252,10 @@ enum dev_reason {
struct cgpu_info {
int cgminer_id;
- struct device_api *api;
+ const struct device_api *api;
int device_id;
- char *name;
- char *device_path;
+ const char *name;
+ const char *device_path;
FILE *device_file;
union {
#ifdef USE_ZTEX
@@ -285,7 +285,7 @@ struct cgpu_info {
int virtual_adl;
int intensity;
bool dynamic;
- char *kname;
+ const char *kname;
#ifdef HAVE_OPENCL
cl_uint vwidth;
size_t work_size;