Skip to content

Commit c9fe133

Browse files
fingolfinChrisJefferson
authored andcommitted
remove unused function, declare markVisited as static
1 parent c2eac48 commit c9fe133

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

src/profile.c

+1-26
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ static inline void printOutput(int fileid, int line, BOOL exec, BOOL visited)
532532

533533
// Mark line as visited, and return true if the line has been previously
534534
// visited (executed)
535-
BOOL markVisited(int fileid, UInt line)
535+
static BOOL markVisited(int fileid, UInt line)
536536
{
537537
// Some STATs end up without a file or line -- do not output these
538538
// as they would just confuse the profile generation later.
@@ -555,31 +555,6 @@ BOOL markVisited(int fileid, UInt line)
555555
return TRUE;
556556
}
557557

558-
// Return TRUE is Stat has been visited (executed) before
559-
BOOL visitedStat(Stat stat)
560-
{
561-
int fileid = getFilenameIdOfCurrentFunction();
562-
int line = LINE_STAT(stat);
563-
564-
if (fileid == 0 || line == 0) {
565-
return TRUE;
566-
}
567-
568-
if (LEN_PLIST(profileState.visitedStatements) < fileid ||
569-
!ELM_PLIST(profileState.visitedStatements, fileid)) {
570-
return FALSE;
571-
}
572-
573-
Obj linelist = ELM_PLIST(profileState.visitedStatements, fileid);
574-
575-
if (LEN_PLIST(linelist) < line || !ELM_PLIST(linelist, line)) {
576-
return 0;
577-
}
578-
else {
579-
return 1;
580-
}
581-
}
582-
583558
// type : the type of the statement
584559
// exec : are we executing this statement
585560
// visit: Was this statement previously visited (that is, executed)

0 commit comments

Comments
 (0)