Annotate ClientData callbacks: /*ARGSUSED*/ + /* UNUSED */ markers
All functions that received a ClientData (or FindRegion *) parameter in
commit fc21472e solely to satisfy WASM call_indirect signature matching
are now annotated so static analysers and casual readers can see the
intent has been verified:
/*ARGSUSED*/ before each such function definition
/* UNUSED */ on each unused parameter in the definition
/* UNUSED */ on matching forward declarations
Affected: calmaWriteInitFunc, cifWriteInitFunc, cmdWindSet,
dbStampFunc, dbwElementAlways1, dbwfbWindFunc, DBWHLRedrawWind,
spcnodeHierVisit, extSDTileFunc, extTransPerimFunc,
extAnnularTileFunc, extResistorTileFunc, extDefInitFunc,
extTimesInitFunc.
This commit is contained in:
parent
003babee04
commit
30d40fb206
|
|
@ -112,7 +112,7 @@ bool CalmaUnique = FALSE; /* If TRUE, then if a cell exists in
|
|||
extern bool CalmaDoLibrary; /* Also used by GDS write */
|
||||
|
||||
extern void calmaUnexpected(int wanted, int got);
|
||||
extern int calmaWriteInitFunc(CellDef *def, ClientData cdata);
|
||||
extern int calmaWriteInitFunc(CellDef *def, ClientData cdata); /* UNUSED */
|
||||
|
||||
/*
|
||||
* Scaling.
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ typedef struct {
|
|||
} calmaOutputStruct;
|
||||
|
||||
/* Forward declarations */
|
||||
extern int calmaWriteInitFunc(CellDef *def, ClientData cdata);
|
||||
extern int calmaWriteInitFunc(CellDef *def, ClientData cdata); /* UNUSED */
|
||||
extern int calmaWritePaintFunc(Tile *tile, TileType dinfo, calmaOutputStruct *cos);
|
||||
extern int calmaMergePaintFunc(Tile *tile, TileType dinfo, calmaOutputStruct *cos);
|
||||
extern int calmaWriteUseFunc(CellUse *use, FILE *f);
|
||||
|
|
@ -822,10 +822,11 @@ done:
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
calmaWriteInitFunc(
|
||||
CellDef *def,
|
||||
ClientData cdata)
|
||||
ClientData cdata) /* UNUSED */
|
||||
{
|
||||
def->cd_client = (ClientData) 0;
|
||||
return (0);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ extern int calmaPaintLayerNumber;
|
|||
extern int calmaPaintLayerType;
|
||||
|
||||
/* External functions from CalmaWrite.c */
|
||||
extern int calmaWriteInitFunc(CellDef *def, ClientData cdata);
|
||||
extern int calmaWriteInitFunc(CellDef *def, ClientData cdata); /* UNUSED */
|
||||
|
||||
/* Structure used by calmaWritePaintFuncZ() and others */
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ static const char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magi
|
|||
#include "textio/textio.h"
|
||||
|
||||
/* Forward declarations */
|
||||
extern int cifWriteInitFunc(CellDef *def, ClientData cdata);
|
||||
extern int cifWriteInitFunc(CellDef *def, ClientData cdata); /* UNUSED */
|
||||
extern int cifWriteMarkFunc(CellUse *use);
|
||||
extern int cifWritePaintFunc(Tile *tile, TileType dinfo, FILE *f);
|
||||
extern int cifWriteLabelFunc(Tile *tile, TileType dinfo, FILE *f);
|
||||
|
|
@ -204,10 +204,11 @@ CIFWrite(
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
cifWriteInitFunc(
|
||||
CellDef *def,
|
||||
ClientData cdata)
|
||||
ClientData cdata) /* UNUSED */
|
||||
{
|
||||
def->cd_client = (ClientData) 0;
|
||||
return (0);
|
||||
|
|
|
|||
|
|
@ -1019,7 +1019,7 @@ CmdSetWindCaption(
|
|||
* edit cell was selected.
|
||||
*/
|
||||
{
|
||||
int cmdWindSet(MagWindow *window, ClientData clientData);
|
||||
int cmdWindSet(MagWindow *window, ClientData clientData); /* UNUSED */
|
||||
|
||||
newEditDef = (newEditUse) ? newEditUse->cu_def : NULL;
|
||||
newRootDef = rootDef;
|
||||
|
|
@ -1053,10 +1053,11 @@ CmdSetWindCaption(
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
cmdWindSet(
|
||||
MagWindow *window,
|
||||
ClientData clientData)
|
||||
ClientData clientData) /* UNUSED */
|
||||
{
|
||||
char caption[200];
|
||||
CellDef *wDef;
|
||||
|
|
|
|||
|
|
@ -238,10 +238,11 @@ DBUpdateStamps(def)
|
|||
}
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
dbStampFunc(cellDef, cdata)
|
||||
CellDef *cellDef;
|
||||
ClientData cdata;
|
||||
ClientData cdata; /* UNUSED */
|
||||
{
|
||||
CellUse *cu;
|
||||
CellDef *cd;
|
||||
|
|
|
|||
|
|
@ -867,10 +867,11 @@ dbwelemGetTransform(use, transform, cdarg)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
dbwElementAlways1(w, clientData)
|
||||
MagWindow *w; /* Unused. */
|
||||
ClientData clientData; /* Unused. */
|
||||
MagWindow *w; /* UNUSED */
|
||||
ClientData clientData; /* UNUSED */
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -531,10 +531,11 @@ dbwfbGetTransform(use, transform, cdarg)
|
|||
* cell.
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
dbwfbWindFunc(w, clientData)
|
||||
MagWindow *w; /* Unused. */
|
||||
ClientData clientData; /* Unused. */
|
||||
MagWindow *w; /* UNUSED */
|
||||
ClientData clientData; /* UNUSED */
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -357,10 +357,11 @@ DBWHLRedrawPrepWindow(MagWindow *window, Rect *area)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
DBWHLRedrawWind(window, clientData)
|
||||
MagWindow *window; /* Window in which to redraw highlights. */
|
||||
ClientData clientData; /* Unused. */
|
||||
ClientData clientData; /* UNUSED */
|
||||
{
|
||||
int i;
|
||||
DBWclientRec *crec;
|
||||
|
|
|
|||
|
|
@ -1563,13 +1563,14 @@ spcsubHierVisit(
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
spcnodeHierVisit(
|
||||
HierContext *hc,
|
||||
EFNode *node,
|
||||
int res,
|
||||
double cap,
|
||||
ClientData cdata)
|
||||
ClientData cdata) /* UNUSED */
|
||||
{
|
||||
HierName *hierName;
|
||||
bool isConnected = FALSE;
|
||||
|
|
|
|||
|
|
@ -147,13 +147,13 @@ NodeRegion *temp_subsnode = NULL; /* Last subsnode found */
|
|||
/* Forward declarations */
|
||||
void extOutputNodes();
|
||||
int extTransTileFunc();
|
||||
int extTransPerimFunc(Boundary *, ClientData);
|
||||
int extTransPerimFunc(Boundary *, ClientData); /* UNUSED */
|
||||
int extTransFindSubs();
|
||||
int extTransFindId();
|
||||
void extTermAPFunc();
|
||||
|
||||
int extAnnularTileFunc(Tile *, TileType, int, FindRegion *);
|
||||
int extResistorTileFunc(Tile *, TileType, int, FindRegion *);
|
||||
int extAnnularTileFunc(Tile *, TileType, int, FindRegion *); /* UNUSED */
|
||||
int extResistorTileFunc(Tile *, TileType, int, FindRegion *); /* UNUSED */
|
||||
int extSpecialPerimFunc();
|
||||
|
||||
void extFindDuplicateLabels();
|
||||
|
|
@ -2185,12 +2185,13 @@ extDevFindParamMatch(devptr, length, width)
|
|||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
extSDTileFunc(tile, dinfo, pNum, arg)
|
||||
Tile *tile;
|
||||
TileType dinfo; /* (unused) */
|
||||
TileType dinfo; /* UNUSED */
|
||||
int pNum;
|
||||
FindRegion *arg;
|
||||
FindRegion *arg; /* UNUSED */
|
||||
{
|
||||
LinkedTile *newdevtile;
|
||||
|
||||
|
|
@ -3948,10 +3949,11 @@ extTermAPFunc(tile, dinfo, eapd)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
extTransPerimFunc(bp, cdata)
|
||||
Boundary *bp;
|
||||
ClientData cdata;
|
||||
ClientData cdata; /* UNUSED */
|
||||
{
|
||||
TileType tinside, toutside, dinfo;
|
||||
Tile *tile;
|
||||
|
|
@ -4227,12 +4229,13 @@ extTransPerimFunc(bp, cdata)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
extAnnularTileFunc(tile, dinfo, pNum, arg)
|
||||
Tile *tile;
|
||||
TileType dinfo;
|
||||
int pNum;
|
||||
FindRegion *arg;
|
||||
FindRegion *arg; /* UNUSED */
|
||||
{
|
||||
TileTypeBitMask mask;
|
||||
TileType loctype;
|
||||
|
|
@ -4278,12 +4281,13 @@ extAnnularTileFunc(tile, dinfo, pNum, arg)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
extResistorTileFunc(tile, dinfo, pNum, arg)
|
||||
Tile *tile;
|
||||
TileType dinfo;
|
||||
int pNum;
|
||||
FindRegion *arg;
|
||||
FindRegion *arg; /* UNUSED */
|
||||
{
|
||||
TileTypeBitMask mask;
|
||||
TileType loctype;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ typedef struct _linkedDef {
|
|||
Stack *extDefStack;
|
||||
|
||||
/* Forward declarations */
|
||||
int extDefInitFunc(CellDef *, ClientData);
|
||||
int extDefInitFunc(CellDef *, ClientData); /* UNUSED */
|
||||
void extDefPush();
|
||||
void extDefIncremental();
|
||||
void extParents();
|
||||
|
|
@ -395,10 +395,11 @@ ExtAll(rootUse)
|
|||
* cell defs, in preparation for extracting a subtree
|
||||
* rooted at a particular def.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
extDefInitFunc(def, cdata)
|
||||
CellDef *def;
|
||||
ClientData cdata;
|
||||
ClientData cdata; /* UNUSED */
|
||||
{
|
||||
def->cd_client = (ClientData) 0;
|
||||
return (0);
|
||||
|
|
|
|||
|
|
@ -288,10 +288,11 @@ ExtTimes(rootUse, f)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
extTimesInitFunc(use, cdata)
|
||||
CellUse *use;
|
||||
ClientData cdata;
|
||||
ClientData cdata; /* UNUSED */
|
||||
{
|
||||
CellDef *def = use->cu_def;
|
||||
struct cellStats *cs;
|
||||
|
|
|
|||
Loading…
Reference in New Issue