V0.8: Remove some more compile warnings.
This patch removes some more compile warnings when compiling using the default gcc compiler for Ubuntu-10.10.
This commit is contained in:
parent
ae14a58bff
commit
9bab275716
|
|
@ -403,6 +403,12 @@ W [ \t\b\f]+
|
|||
/* Absorb the rest of the line when a broken directive is detected. */
|
||||
<ERROR_LINE>[^\r\n]* { yy_pop_state(); }
|
||||
|
||||
<ERROR_LINE>(\n|"\r\n"|"\n\r"|\r) {
|
||||
yy_pop_state();
|
||||
istack->lineno += 1;
|
||||
fputc('\n', yyout);
|
||||
}
|
||||
|
||||
%%
|
||||
/* Defined macros are kept in this table for convenient lookup. As
|
||||
`define directives are matched (and the do_define() function
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ W [ \t\b\f\r]+
|
|||
|
||||
/* Final catchall. something got lost or mishandled. */
|
||||
|
||||
. { cerr << yylloc.text << ":" << yylloc.first_line
|
||||
<*>.|\n { cerr << yylloc.text << ":" << yylloc.first_line
|
||||
<< ": error: unmatched character (";
|
||||
if (isgraph(yytext[0]))
|
||||
cerr << yytext[0];
|
||||
|
|
|
|||
|
|
@ -1336,7 +1336,7 @@ static PLI_INT32 sys_printtimescale_calltf(char *xx)
|
|||
{
|
||||
vpiHandle sys = vpi_handle(vpiSysTfCall, 0);
|
||||
vpiHandle argv = vpi_iterate(vpiArgument, sys);
|
||||
vpiHandle scope;
|
||||
vpiHandle scope = 0;
|
||||
if (!argv) {
|
||||
vpiHandle parent = vpi_handle(vpiScope, sys);
|
||||
while (parent) {
|
||||
|
|
|
|||
|
|
@ -359,10 +359,10 @@ statement
|
|||
/* XXXX Legacy declaration has no type name. */
|
||||
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING ';'
|
||||
{ compile_scope_decl($1, $3, $5, "", 0); }
|
||||
{ compile_scope_decl($1, $3, $5, 0, 0); }
|
||||
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING ',' T_SYMBOL ';'
|
||||
{ compile_scope_decl($1, $3, $5, "", $7); }
|
||||
{ compile_scope_decl($1, $3, $5, 0, $7); }
|
||||
|
||||
/* Scope recall has no label of its own, but refers by label to a
|
||||
declared scope. */
|
||||
|
|
|
|||
|
|
@ -55,14 +55,14 @@ static FILE* logfile;
|
|||
void vpi_mcd_init(FILE *log)
|
||||
{
|
||||
mcd_table[0].fp = stdout;
|
||||
mcd_table[0].filename = "stdout";
|
||||
mcd_table[0].filename = strdup("stdout");
|
||||
|
||||
fd_table[0].fp = stdin;
|
||||
fd_table[0].filename = "stdin";
|
||||
fd_table[0].filename = strdup("stdin");
|
||||
fd_table[1].fp = stdout;
|
||||
fd_table[1].filename = "stdout";
|
||||
fd_table[1].filename = strdup("stdout");
|
||||
fd_table[2].fp = stderr;
|
||||
fd_table[2].filename = "stderr";
|
||||
fd_table[2].filename = strdup("stderr");
|
||||
|
||||
logfile = log;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ PLI_INT32 vpi_chk_error(p_vpi_error_info info)
|
|||
info->level = vpip_last_error.level;
|
||||
info->message = vpip_last_error.message;
|
||||
info->product = vpi_vlog_info.product;
|
||||
info->code = "";
|
||||
info->code = (char *) "";
|
||||
info->file = 0;
|
||||
info->line = 0;
|
||||
|
||||
|
|
@ -329,8 +329,10 @@ PLI_INT32 vpi_get_vlog_info(p_vpi_vlog_info vlog_info_p)
|
|||
|
||||
void vpi_set_vlog_info(int argc, char** argv)
|
||||
{
|
||||
vpi_vlog_info.product = "Icarus Verilog";
|
||||
vpi_vlog_info.version = "$Name: $";
|
||||
static char icarus_product[] = "Icarus Verilog";
|
||||
static char icarus_version[] = "0.8.7";
|
||||
vpi_vlog_info.product = icarus_product;
|
||||
vpi_vlog_info.version = icarus_version;
|
||||
vpi_vlog_info.argc = argc;
|
||||
vpi_vlog_info.argv = argv;
|
||||
|
||||
|
|
|
|||
|
|
@ -400,7 +400,8 @@ compile_scope_decl(char*label, char*type, char*name, char*tname, char*parent)
|
|||
assert(scope->base.vpi_type);
|
||||
|
||||
scope->name = vpip_name_string(name);
|
||||
scope->tname = vpip_name_string(tname);
|
||||
if (tname) scope->tname = vpip_name_string(tname);
|
||||
else scope->tname = vpip_name_string("");
|
||||
scope->intern = 0;
|
||||
scope->nintern = 0;
|
||||
scope->threads = 0;
|
||||
|
|
|
|||
|
|
@ -75,9 +75,10 @@ static int timevar_time_get(int code, vpiHandle ref)
|
|||
|
||||
static char* timevar_time_get_str(int code, vpiHandle ref)
|
||||
{
|
||||
static char func_name[] = "$time";
|
||||
switch (code) {
|
||||
case vpiName:
|
||||
return "$time";
|
||||
return func_name;
|
||||
default:
|
||||
fprintf(stderr, "Code: %d\n", code);
|
||||
assert(0);
|
||||
|
|
@ -87,9 +88,10 @@ static char* timevar_time_get_str(int code, vpiHandle ref)
|
|||
|
||||
static char* timevar_realtime_get_str(int code, vpiHandle ref)
|
||||
{
|
||||
static char func_name[] = "$realtime";
|
||||
switch (code) {
|
||||
case vpiName:
|
||||
return "$realtime";
|
||||
return func_name;
|
||||
default:
|
||||
fprintf(stderr, "Code: %d\n", code);
|
||||
assert(0);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ struct __vpiVThrVec {
|
|||
unsigned bas;
|
||||
unsigned wid;
|
||||
unsigned signed_flag : 1;
|
||||
char *name;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
inline static
|
||||
|
|
@ -413,7 +413,7 @@ vpiHandle vpip_make_vthr_vector(unsigned base, unsigned wid, bool signed_flag)
|
|||
|
||||
struct __vpiVThrWord {
|
||||
struct __vpiHandle base;
|
||||
char* name;
|
||||
const char* name;
|
||||
int subtype;
|
||||
unsigned index;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue