mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
V0.9: Fix shadow warnings found on OpenBSD.
gcc on OpenBSD reported shadow warnings for variables, arguments named log, time and exp. This patch renanes those variables to logic, timerec and expr.
This commit is contained in:
+13
-13
@@ -1230,7 +1230,7 @@ static PLI_INT32 sys_strobe_calltf(PLI_BYTE8*name)
|
||||
{
|
||||
vpiHandle callh, argv, scope;
|
||||
struct t_cb_data cb;
|
||||
struct t_vpi_time time;
|
||||
struct t_vpi_time timerec;
|
||||
struct strobe_cb_info*info;
|
||||
PLI_UINT32 fd_mcd;
|
||||
|
||||
@@ -1280,13 +1280,13 @@ static PLI_INT32 sys_strobe_calltf(PLI_BYTE8*name)
|
||||
info->scope= scope;
|
||||
array_from_iterator(info, argv);
|
||||
|
||||
time.type = vpiSimTime;
|
||||
time.low = 0;
|
||||
time.high = 0;
|
||||
timerec.type = vpiSimTime;
|
||||
timerec.low = 0;
|
||||
timerec.high = 0;
|
||||
|
||||
cb.reason = cbReadOnlySynch;
|
||||
cb.cb_rtn = strobe_cb;
|
||||
cb.time = &time;
|
||||
cb.time = &timerec;
|
||||
cb.obj = 0;
|
||||
cb.value = 0;
|
||||
cb.user_data = (char*)info;
|
||||
@@ -1339,7 +1339,7 @@ static PLI_INT32 monitor_cb_2(p_cb_data cb)
|
||||
static PLI_INT32 monitor_cb_1(p_cb_data cause)
|
||||
{
|
||||
struct t_cb_data cb;
|
||||
struct t_vpi_time time;
|
||||
struct t_vpi_time timerec;
|
||||
|
||||
if (monitor_enabled == 0) return 0;
|
||||
if (monitor_scheduled) return 0;
|
||||
@@ -1348,13 +1348,13 @@ static PLI_INT32 monitor_cb_1(p_cb_data cause)
|
||||
the monitor to happen at the end of the time slice and mark
|
||||
it as scheduled. */
|
||||
monitor_scheduled += 1;
|
||||
time.type = vpiSimTime;
|
||||
time.low = 0;
|
||||
time.high = 0;
|
||||
timerec.type = vpiSimTime;
|
||||
timerec.low = 0;
|
||||
timerec.high = 0;
|
||||
|
||||
cb.reason = cbReadOnlySynch;
|
||||
cb.cb_rtn = monitor_cb_2;
|
||||
cb.time = &time;
|
||||
cb.time = &timerec;
|
||||
cb.obj = 0;
|
||||
cb.value = 0;
|
||||
vpi_register_cb(&cb);
|
||||
@@ -1376,7 +1376,7 @@ static PLI_INT32 sys_monitor_calltf(PLI_BYTE8*name)
|
||||
vpiHandle callh, argv, scope;
|
||||
unsigned idx;
|
||||
struct t_cb_data cb;
|
||||
struct t_vpi_time time;
|
||||
struct t_vpi_time timerec;
|
||||
|
||||
callh = vpi_handle(vpiSysTfCall, 0);
|
||||
argv = vpi_iterate(vpiArgument, callh);
|
||||
@@ -1412,10 +1412,10 @@ static PLI_INT32 sys_monitor_calltf(PLI_BYTE8*name)
|
||||
/* Attach callbacks to all the parameters that might change. */
|
||||
monitor_callbacks = calloc(monitor_info.nitems, sizeof(vpiHandle));
|
||||
|
||||
time.type = vpiSuppressTime;
|
||||
timerec.type = vpiSuppressTime;
|
||||
cb.reason = cbValueChange;
|
||||
cb.cb_rtn = monitor_cb_1;
|
||||
cb.time = &time;
|
||||
cb.time = &timerec;
|
||||
cb.value = NULL;
|
||||
for (idx = 0 ; idx < monitor_info.nitems ; idx += 1) {
|
||||
|
||||
|
||||
+3
-3
@@ -23,13 +23,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
PLI_UINT64 timerec_to_time64(const struct t_vpi_time*time)
|
||||
PLI_UINT64 timerec_to_time64(const struct t_vpi_time*timerec)
|
||||
{
|
||||
PLI_UINT64 tmp;
|
||||
|
||||
tmp = time->high;
|
||||
tmp = timerec->high;
|
||||
tmp <<= 32;
|
||||
tmp |= (PLI_UINT64) time->low;
|
||||
tmp |= (PLI_UINT64) timerec->low;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#ifndef __vpi_sys_priv_H
|
||||
#define __vpi_sys_priv_H
|
||||
/*
|
||||
* Copyright (c) 2002-2009 Stephen Williams ([email protected])
|
||||
* Copyright (c) 2002-2010 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
@@ -33,7 +33,7 @@ struct context_s {
|
||||
extern void sgenrand(struct context_s *context, unsigned long seed);
|
||||
extern unsigned long genrand(struct context_s *context);
|
||||
|
||||
extern PLI_UINT64 timerec_to_time64(const struct t_vpi_time*time);
|
||||
extern PLI_UINT64 timerec_to_time64(const struct t_vpi_time*timerec);
|
||||
|
||||
extern char *as_escaped(char *arg);
|
||||
extern char *get_filename(vpiHandle callh, char *name, vpiHandle file);
|
||||
|
||||
Reference in New Issue
Block a user