V0.9 Add casts/etc. in vvp directory to remove Cygwin compile warnings.
This commit is contained in:
parent
b5c819051b
commit
663ab34ae7
|
|
@ -1370,6 +1370,8 @@ static struct __vpiModPathSrc*make_modpath_src(struct __vpiModPath*path,
|
|||
break;
|
||||
#endif
|
||||
default:
|
||||
posedge = false;
|
||||
negedge = false;
|
||||
fprintf(stderr, "Unknown edge identifier %c(%d).\n", edge,
|
||||
edge);
|
||||
assert(0);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2009 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -259,7 +259,8 @@ static struct __vpiCallback* make_sync(p_cb_data data, bool readonly_flag)
|
|||
}
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unsupported time type %d.\n", obj->cb_time.type);
|
||||
fprintf(stderr, "Unsupported time type %d.\n",
|
||||
(int)obj->cb_time.type);
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
|
|
@ -288,7 +289,8 @@ static struct __vpiCallback* make_afterdelay(p_cb_data data, bool simtime_flag)
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unsupported time type %d.\n", obj->cb_time.type);
|
||||
fprintf(stderr, "Unsupported time type %d.\n",
|
||||
(int)obj->cb_time.type);
|
||||
assert(0);
|
||||
tv = 0;
|
||||
break;
|
||||
|
|
@ -465,7 +467,7 @@ vpiHandle vpi_register_cb(p_cb_data data)
|
|||
default:
|
||||
fprintf(stderr, "vpi error: vpi_register_cb invalid or "
|
||||
"unsupported callback reason: %d\n",
|
||||
data->reason);
|
||||
(int)data->reason);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -510,7 +512,7 @@ void callback_execute(struct __vpiCallback*cur)
|
|||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported time format %d.\n",
|
||||
cur->cb_data.time->type);
|
||||
(int)cur->cb_data.time->type);
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
|
|
@ -641,7 +643,7 @@ void vvp_fun_signal4::get_value(struct t_vpi_value*vp)
|
|||
default:
|
||||
fprintf(stderr, "vpi_callback: value "
|
||||
"format %d not supported (fun_signal)\n",
|
||||
vp->format);
|
||||
(int)vp->format);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -656,7 +658,7 @@ void vvp_fun_signal8::get_value(struct t_vpi_value*vp)
|
|||
default:
|
||||
fprintf(stderr, "vpi_callback: value "
|
||||
"format %d not supported (fun_signal8)\n",
|
||||
vp->format);
|
||||
(int)vp->format);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -716,6 +718,6 @@ void vvp_fun_signal_real::get_value(struct t_vpi_value*vp)
|
|||
default:
|
||||
fprintf(stderr, "vpi_callback: value "
|
||||
"format %d not supported (fun_signal_real)\n",
|
||||
vp->format);
|
||||
(int)vp->format);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,8 @@ static void string_value(vpiHandle ref, p_vpi_value vp)
|
|||
|
||||
|
||||
default:
|
||||
fprintf(stderr, "ERROR (vpi_const.cc): vp->format: %d\n", vp->format);
|
||||
fprintf(stderr, "ERROR (vpi_const.cc): vp->format: %d\n",
|
||||
(int)vp->format);
|
||||
assert(0);
|
||||
|
||||
vp->format = vpiSuppressVal;
|
||||
|
|
@ -405,7 +406,7 @@ static void binary_value(vpiHandle ref, p_vpi_value vp)
|
|||
|
||||
default:
|
||||
fprintf(stderr, "vvp error: format %d not supported "
|
||||
"by vpiBinaryConst\n", vp->format);
|
||||
"by vpiBinaryConst\n", (int)vp->format);
|
||||
vp->format = vpiSuppressVal;
|
||||
break;
|
||||
}
|
||||
|
|
@ -624,7 +625,7 @@ static void dec_value(vpiHandle ref, p_vpi_value vp)
|
|||
|
||||
default:
|
||||
fprintf(stderr, "vvp error (vpi_const.cc): format %d not supported "
|
||||
"by vpiDecConst\n", vp->format);
|
||||
"by vpiDecConst\n", (int)vp->format);
|
||||
vp->format = vpiSuppressVal;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ vpi_mcd_vprintf(PLI_UINT32 mcd, const char*fmt, va_list ap)
|
|||
|
||||
if (vpi_trace) {
|
||||
fprintf(vpi_trace, "vpi_mcd_vprintf(0x%08x, %s, ...);\n",
|
||||
mcd, fmt);
|
||||
(unsigned int)mcd, fmt);
|
||||
}
|
||||
|
||||
#ifdef __MINGW32__
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ static const char* vpi_property_str(PLI_INT32 code)
|
|||
case vpiSize:
|
||||
return "vpiSize";
|
||||
default:
|
||||
sprintf(buf, "%d", code);
|
||||
sprintf(buf, "%d", (int)code);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
|
@ -256,7 +256,7 @@ static const char* vpi_type_values(PLI_INT32 code)
|
|||
case vpiTimeVar:
|
||||
return "vpiTimeVar";
|
||||
default:
|
||||
sprintf(buf, "%d", code);
|
||||
sprintf(buf, "%d", (int)code);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
|
@ -429,7 +429,7 @@ void vpi_get_time(vpiHandle obj, s_vpi_time*vp)
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "vpi_get_time: unknown type: %d\n", vp->type);
|
||||
fprintf(stderr, "vpi_get_time: unknown type: %d\n", (int)vp->type);
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
|
|
@ -521,7 +521,7 @@ void vpip_vec4_get_value(const vvp_vector4_t&word_val, unsigned width,
|
|||
switch (vp->format) {
|
||||
default:
|
||||
fprintf(stderr, "sorry: Format %d not implemented for "
|
||||
"getting vector values.\n", vp->format);
|
||||
"getting vector values.\n", (int)vp->format);
|
||||
assert(0);
|
||||
|
||||
case vpiSuppressVal:
|
||||
|
|
@ -688,7 +688,7 @@ void vpip_real_get_value(double real, s_vpi_value*vp)
|
|||
switch (vp->format) {
|
||||
default:
|
||||
fprintf(stderr, "sorry: Format %d not implemented for "
|
||||
"getting real values.\n", vp->format);
|
||||
"getting real values.\n", (int)vp->format);
|
||||
assert(0);
|
||||
|
||||
case vpiSuppressVal:
|
||||
|
|
@ -723,7 +723,7 @@ double real_from_vpi_value(s_vpi_value*vp)
|
|||
switch (vp->format) {
|
||||
default:
|
||||
fprintf(stderr, "sorry: Format %d not implemented for "
|
||||
"putting real values.\n", vp->format);
|
||||
"putting real values.\n", (int)vp->format);
|
||||
assert(0);
|
||||
|
||||
case vpiRealVal:
|
||||
|
|
@ -783,12 +783,12 @@ void vpi_get_value(vpiHandle expr, s_vpi_value*vp)
|
|||
|
||||
case vpiIntVal:
|
||||
fprintf(vpi_trace, "vpi_get_value(<%d>...) -> int=%d\n",
|
||||
expr->vpi_type->type_code, vp->value.integer);
|
||||
expr->vpi_type->type_code, (int)vp->value.integer);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(vpi_trace, "vpi_get_value(<%d>...) -> <%d>=?\n",
|
||||
expr->vpi_type->type_code, vp->format);
|
||||
expr->vpi_type->type_code, (int)vp->format);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -913,7 +913,7 @@ vpiHandle vpi_handle(PLI_INT32 type, vpiHandle ref)
|
|||
|
||||
if (ref == 0) {
|
||||
fprintf(stderr, "internal error: vpi_handle(type=%d, ref=0)\n",
|
||||
type);
|
||||
(int)type);
|
||||
}
|
||||
assert(ref);
|
||||
|
||||
|
|
@ -921,7 +921,7 @@ vpiHandle vpi_handle(PLI_INT32 type, vpiHandle ref)
|
|||
|
||||
if (vpi_trace) {
|
||||
fprintf(vpi_trace, "vpi_handle(%d, %p) -X\n",
|
||||
type, ref);
|
||||
(int)type, ref);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -932,7 +932,7 @@ vpiHandle vpi_handle(PLI_INT32 type, vpiHandle ref)
|
|||
|
||||
if (vpi_trace) {
|
||||
fprintf(vpi_trace, "vpi_handle(%d, %p) -> %p\n",
|
||||
type, ref, res);
|
||||
(int)type, ref, res);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
@ -972,7 +972,7 @@ vpiHandle vpi_iterate(PLI_INT32 type, vpiHandle ref)
|
|||
|
||||
if (vpi_trace) {
|
||||
fprintf(vpi_trace, "vpi_iterate(%d, %p) ->%s\n",
|
||||
type, ref, rtn ? "" : " (null)");
|
||||
(int)type, ref, rtn ? "" : " (null)");
|
||||
}
|
||||
|
||||
return rtn;
|
||||
|
|
|
|||
|
|
@ -718,7 +718,8 @@ static void signal_get_value(vpiHandle ref, s_vpi_value*vp)
|
|||
fprintf(stderr, "vvp internal error: get_value: "
|
||||
"value type %u not implemented."
|
||||
" Signal is %s in scope %s\n",
|
||||
vp->format, vpi_get_str(vpiName, ref), vpip_scope(rfp)->name);
|
||||
(int)vp->format, vpi_get_str(vpiName, ref),
|
||||
vpip_scope(rfp)->name);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
|
@ -850,7 +851,7 @@ vvp_vector4_t vec4_from_vpi_value(s_vpi_value*vp, unsigned wid)
|
|||
default:
|
||||
fprintf(stderr, "vvp internal error: put_value: "
|
||||
"value type %u not implemented here.\n",
|
||||
vp->format);
|
||||
(int)vp->format);
|
||||
assert(0);
|
||||
|
||||
}
|
||||
|
|
@ -1105,8 +1106,8 @@ static char* PV_get_str(int code, vpiHandle ref)
|
|||
case vpiFullName: {
|
||||
const char*nm = vpi_get_str(code, rfp->parent);
|
||||
char full[1024+strlen(nm)];
|
||||
sprintf(full, "%s[%d:%d]", nm, vpi_get(vpiLeftRange, ref),
|
||||
vpi_get(vpiRightRange, ref));
|
||||
sprintf(full, "%s[%d:%d]", nm, (int)vpi_get(vpiLeftRange, ref),
|
||||
(int)vpi_get(vpiRightRange, ref));
|
||||
return simple_set_rbuf_str(full);
|
||||
}
|
||||
|
||||
|
|
@ -1169,8 +1170,8 @@ static void PV_get_value(vpiHandle ref, p_vpi_value vp)
|
|||
|
||||
default:
|
||||
fprintf(stderr, "vvp internal error: PV_get_value: "
|
||||
"value type %u not implemented. Signal is %s.\n",
|
||||
vp->format, vpi_get_str(vpiFullName, rfp->parent));
|
||||
"value type %d not implemented. Signal is %s.\n",
|
||||
(int)vp->format, vpi_get_str(vpiFullName, rfp->parent));
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,8 @@ static vpiHandle sysfunc_put_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
vthread_put_bit(vpip_current_vthread, rfp->vbit, BIT4_Z);
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported value %d.\n", vp->value.scalar);
|
||||
fprintf(stderr, "Unsupported value %d.\n",
|
||||
(int)vp->value.scalar);
|
||||
assert(0);
|
||||
}
|
||||
break;
|
||||
|
|
@ -278,6 +279,7 @@ static vpiHandle sysfunc_put_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
bit4 = BIT4_X;
|
||||
break;
|
||||
default:
|
||||
bit4 = BIT4_X;
|
||||
fprintf(stderr, "Unsupported bit value %d.\n",
|
||||
bit);
|
||||
assert(0);
|
||||
|
|
@ -292,7 +294,7 @@ static vpiHandle sysfunc_put_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unsupported format %d.\n", vp->format);
|
||||
fprintf(stderr, "Unsupported format %d.\n", (int)vp->format);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
@ -319,7 +321,7 @@ static vpiHandle sysfunc_put_real_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unsupported format %d.\n", vp->format);
|
||||
fprintf(stderr, "Unsupported format %d.\n", (int)vp->format);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
@ -356,7 +358,7 @@ static vpiHandle sysfunc_put_4net_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported bit value %d.\n",
|
||||
vp->value.scalar);
|
||||
(int)vp->value.scalar);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
|
@ -409,6 +411,7 @@ static vpiHandle sysfunc_put_4net_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
bit4 = BIT4_X;
|
||||
break;
|
||||
default:
|
||||
bit4 = BIT4_X;
|
||||
fprintf(stderr, "Unsupported bit value %d.\n",
|
||||
bit);
|
||||
assert(0);
|
||||
|
|
@ -422,7 +425,8 @@ static vpiHandle sysfunc_put_4net_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "XXXX format=%d, vwid=%u\n", vp->format, rfp->vwid);
|
||||
fprintf(stderr, "XXXX format=%d, vwid=%u\n", (int)vp->format,
|
||||
rfp->vwid);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
@ -446,7 +450,8 @@ static vpiHandle sysfunc_put_rnet_value(vpiHandle ref, p_vpi_value vp, int)
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unsupported format %d.\n", vp->format);
|
||||
val = 0.0;
|
||||
fprintf(stderr, "Unsupported format %d.\n", (int)vp->format);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
@ -588,7 +593,7 @@ vpiHandle vpip_build_vpi_call(const char*name, unsigned vbit, int vwid,
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unsupported type %d.\n", defn->info.type);
|
||||
fprintf(stderr, "Unsupported type %d.\n", (int)defn->info.type);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
@ -730,7 +735,7 @@ void vpi_register_systf(const struct t_vpi_systf_data*ss)
|
|||
cur->base.vpi_type = &vpip_sysfunc_def_rt;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported type %d.\n", ss->type);
|
||||
fprintf(stderr, "Unsupported type %d.\n", (int)ss->type);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ static void timevar_get_value(vpiHandle ref, s_vpi_value*vp, bool is_int_func,
|
|||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "vpi_time: unknown format: %d\n", vp->format);
|
||||
fprintf(stderr, "vpi_time: unknown format: %d\n", (int)vp->format);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ static void vthr_vec_get_value(vpiHandle ref, s_vpi_value*vp)
|
|||
|
||||
default:
|
||||
fprintf(stderr, "internal error: vpi_get_value(<format=%d>)"
|
||||
" not implemented for vthr_vectors.\n", vp->format);
|
||||
" not implemented for vthr_vectors.\n", (int)vp->format);
|
||||
/* XXXX Not implemented yet. */
|
||||
assert(0);
|
||||
}
|
||||
|
|
@ -398,7 +398,7 @@ static vpiHandle vthr_vec_put_value(vpiHandle ref, s_vpi_value*vp, int)
|
|||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported scalar value %d.\n",
|
||||
vp->value.scalar);
|
||||
(int)vp->value.scalar);
|
||||
assert(0);
|
||||
}
|
||||
break;
|
||||
|
|
@ -431,7 +431,7 @@ static vpiHandle vthr_vec_put_value(vpiHandle ref, s_vpi_value*vp, int)
|
|||
}
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unsupported format %d.\n", vp->format);
|
||||
fprintf(stderr, "Unsupported format %d.\n", (int)vp->format);
|
||||
assert(0);
|
||||
|
||||
}
|
||||
|
|
@ -579,7 +579,7 @@ static void vthr_real_get_value(vpiHandle ref, s_vpi_value*vp)
|
|||
|
||||
default:
|
||||
fprintf(stderr, "vvp error: get %d not supported "
|
||||
"by vpiConstant (Real)\n", vp->format);
|
||||
"by vpiConstant (Real)\n", (int)vp->format);
|
||||
|
||||
vp->format = vpiSuppressVal;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2003-2009 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -100,7 +100,7 @@ void vpip_format_strength(char*str, s_vpi_value*value, unsigned bit)
|
|||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported type %d.\n",
|
||||
value->value.strength[bit].logic);
|
||||
(int)value->value.strength[bit].logic);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,10 +190,10 @@ vvp_bit4_t add_with_carry(vvp_bit4_t a, vvp_bit4_t b, vvp_bit4_t&c)
|
|||
case 3:
|
||||
c = BIT4_1;
|
||||
return BIT4_1;
|
||||
default:
|
||||
fprintf(stderr, "Incorrect result %d.\n", sum);
|
||||
assert(0);
|
||||
}
|
||||
fprintf(stderr, "Incorrect result %d.\n", sum);
|
||||
assert(0);
|
||||
return BIT4_X;
|
||||
}
|
||||
|
||||
vvp_bit4_t scalar_to_bit4(PLI_INT32 scalar)
|
||||
|
|
@ -207,10 +207,10 @@ vvp_bit4_t scalar_to_bit4(PLI_INT32 scalar)
|
|||
return BIT4_X;
|
||||
case vpiZ:
|
||||
return BIT4_Z;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported scalar value %d.\n", scalar);
|
||||
assert(0);
|
||||
}
|
||||
fprintf(stderr, "Unsupported scalar value %d.\n", (int)scalar);
|
||||
assert(0);
|
||||
return BIT4_X;
|
||||
}
|
||||
|
||||
vvp_bit4_t operator ^ (vvp_bit4_t a, vvp_bit4_t b)
|
||||
|
|
|
|||
Loading…
Reference in New Issue