Cleaned up some errors (most minor, some not so minor) in the
code that were surfaced by Stefan Thiede running clang on Mac OS. Function prototype warnings have not been fixed yet, as that is a more involved fix, although it needs to be done.
This commit is contained in:
parent
777f7ef095
commit
37b1a2a07d
|
|
@ -91,7 +91,7 @@ char *ActelName(char *Name)
|
|||
/* strip physical-pin information, if it exists */
|
||||
if ((nm = strrchr(name,PHYSICALPIN[0])) != NULL) *nm = '\0';
|
||||
if (strlen(name) > 13) {
|
||||
ActelIndex = (++ActelIndex) % ACTELNAMESIZE;
|
||||
ActelIndex = (ActelIndex + 1) % ACTELNAMESIZE;
|
||||
/* format the value of the hashed value of the string */
|
||||
sprintf(ActelNames[ActelIndex], "$%lX", ActelNameHash(name));
|
||||
if (Debug)
|
||||
|
|
@ -102,7 +102,7 @@ Printf("ActelNameHash returns %s on name %s\n",ActelNames[ActelIndex], name);
|
|||
NeedsQuoting = 0;
|
||||
if (NULL != strpbrk(name, ".,:; \t\"'\n\r")) NeedsQuoting = 1;
|
||||
|
||||
ActelIndex = (++ActelIndex) % ACTELNAMESIZE;
|
||||
ActelIndex = (ActelIndex + 1) % ACTELNAMESIZE;
|
||||
if (!NeedsQuoting) {
|
||||
strcpy(ActelNames[ActelIndex], name);
|
||||
return(ActelNames[ActelIndex]);
|
||||
|
|
|
|||
|
|
@ -685,6 +685,7 @@ void SpiceSkipNewLine(void)
|
|||
ungetc(contline, infile);
|
||||
}
|
||||
|
||||
#if 0 /* Commented with "#if 0" due to comment characters in the comment */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function similar to strtok() for token parsing. The difference is */
|
||||
/* that it takes two sets of delimiters. The first is whitespace */
|
||||
|
|
@ -705,6 +706,7 @@ void SpiceSkipNewLine(void)
|
|||
/* the first character of the delimiter string in addition to marking */
|
||||
/* the boundary between two-character and one-character delimiters. */
|
||||
/*----------------------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
char *strdtok0(char *pstring, char *delim1, char *delim2, char isverilog)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -449,6 +449,7 @@ int removeshorted(struct hashlist *p, int file)
|
|||
ob = nob;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Remove shorted instances of class "class" from the database */
|
||||
|
|
@ -539,6 +540,7 @@ int deleteclass(struct hashlist *p, int file)
|
|||
}
|
||||
}
|
||||
FREE(checknodes);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Remove all instances of class "class" from the database */
|
||||
|
|
@ -576,6 +578,7 @@ int renameinstances(struct hashlist *p, int file)
|
|||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void InstanceRename(char *from, char *to, int file)
|
||||
|
|
@ -598,9 +601,10 @@ int freeprop(struct hashlist *p)
|
|||
struct property *prop;
|
||||
|
||||
prop = (struct property *)(p->ptr);
|
||||
if (prop->type == PROP_STRING)
|
||||
if (prop->type == PROP_STRING) {
|
||||
if (prop->pdefault.string != NULL)
|
||||
FREE(prop->pdefault.string);
|
||||
}
|
||||
else if (prop->type == PROP_EXPRESSION) {
|
||||
struct tokstack *stackptr, *nptr;
|
||||
stackptr = prop->pdefault.stack;
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ void Fanout(char *cell, char *node, int filter)
|
|||
while (ob != NULL) {
|
||||
char *obname = ob->name;
|
||||
if (*obname == '/') obname++;
|
||||
if (ob->node == nodenum)
|
||||
if (ob->node == nodenum) {
|
||||
if (filter == ALLOBJECTS) {
|
||||
Printf(" %s (", obname);
|
||||
PrintObjectType(ob->type);
|
||||
|
|
@ -331,6 +331,7 @@ void Fanout(char *cell, char *node, int filter)
|
|||
else if (ob->type == filter) {
|
||||
Printf(" %s\n", obname);
|
||||
}
|
||||
}
|
||||
ob = ob->next;
|
||||
}
|
||||
}
|
||||
|
|
@ -933,7 +934,7 @@ static int PrintLeavesInCellHash(struct hashlist *p)
|
|||
struct nlist *ptr;
|
||||
|
||||
ptr = (struct nlist *)(p->ptr);
|
||||
if ((ptr->class == CLASS_SUBCKT)) PrintLeavesInCell(ptr->name, ptr->file);
|
||||
if (ptr->class == CLASS_SUBCKT) PrintLeavesInCell(ptr->name, ptr->file);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ void SpiceSubCell(struct nlist *tp, int IsSubCell)
|
|||
if (ob->type == PROPERTY) {
|
||||
struct valuelist *vl;
|
||||
int i;
|
||||
for (i == 0;; i++) {
|
||||
for (i = 0;; i++) {
|
||||
vl = &(ob->instance.props[i]);
|
||||
if (vl->type == PROP_ENDLIST) break;
|
||||
else if (vl->type == PROP_VALUE) {
|
||||
|
|
@ -216,7 +216,7 @@ void SpiceSubCell(struct nlist *tp, int IsSubCell)
|
|||
if (ob->type == PROPERTY) {
|
||||
struct valuelist *vl;
|
||||
int i;
|
||||
for (i == 0;; i++) {
|
||||
for (i = 0;; i++) {
|
||||
vl = &(ob->instance.props[i]);
|
||||
if (vl->type == PROP_ENDLIST) break;
|
||||
else if (vl->type == PROP_VALUE) {
|
||||
|
|
@ -236,7 +236,7 @@ void SpiceSubCell(struct nlist *tp, int IsSubCell)
|
|||
if (ob->type == PROPERTY) {
|
||||
struct valuelist *vl;
|
||||
int i;
|
||||
for (i == 0;; i++) {
|
||||
for (i = 0;; i++) {
|
||||
vl = &(ob->instance.props[i]);
|
||||
if (vl->type == PROP_ENDLIST) break;
|
||||
else if (vl->type == PROP_VALUE) {
|
||||
|
|
@ -399,7 +399,7 @@ int renamepins(struct hashlist *p, int file)
|
|||
ptr = (struct nlist *)(p->ptr);
|
||||
|
||||
if (ptr->file != file)
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
for (ob = ptr->cell; ob != NULL; ob = ob->next) {
|
||||
if (ob->type == FIRSTPIN) {
|
||||
|
|
@ -426,6 +426,7 @@ int renamepins(struct hashlist *p, int file)
|
|||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* If any pins are marked unconnected, see if there are */
|
||||
|
|
|
|||
Loading…
Reference in New Issue