Fixed some compiler warnings.
This is not part of the default build. git-svn-id: svn://10.0.0.236/trunk@63883 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -49,9 +49,10 @@ int IntCount::countAdd(int index, int increment)
|
||||
}
|
||||
}
|
||||
|
||||
int i;
|
||||
IntPair *tpair = new IntPair[numInts+1];
|
||||
for(int i=0; i<divPoint; i++) tpair[i] = iPair[i];
|
||||
for(int i=divPoint; i<numInts; i++) tpair[i+1] = iPair[i];
|
||||
for(i=0; i<divPoint; i++) tpair[i] = iPair[i];
|
||||
for(i=divPoint; i<numInts; i++) tpair[i+1] = iPair[i];
|
||||
++numInts;
|
||||
delete [] iPair;
|
||||
iPair = tpair;
|
||||
|
||||
@@ -376,9 +376,10 @@ void leaky::generateReportHTML(FILE *fp, int *countArray, int count)
|
||||
// she had. I dont remember her name but I always feel guilty about globals)
|
||||
|
||||
// Shell Sort. 581130733 is the max 31 bit value of h = 3h+1
|
||||
for(int mx=usefulSymbols/9, h=581130733; h>0; h/=3) {
|
||||
int mx, i, h;
|
||||
for(mx=usefulSymbols/9, h=581130733; h>0; h/=3) {
|
||||
if(h<mx) {
|
||||
for(int i = h-1; i<usefulSymbols; i++) {
|
||||
for(i = h-1; i<usefulSymbols; i++) {
|
||||
int j, tmp=rankingTable[i], val = countArray[tmp];
|
||||
for(j = i; (j>=h) && (countArray[rankingTable[j-h]]<val); j-=h) {
|
||||
rankingTable[j] = rankingTable[j-h];
|
||||
@@ -398,7 +399,7 @@ void leaky::generateReportHTML(FILE *fp, int *countArray, int count)
|
||||
fprintf(fp, "%5s %5s %4s %s\n",
|
||||
"index", "Count", "Hits", "Function Name");
|
||||
|
||||
for(int i=0; i<usefulSymbols && countArray[rankingTable[i]]>0; i++) {
|
||||
for(i=0; i<usefulSymbols && countArray[rankingTable[i]]>0; i++) {
|
||||
Symbol *sp=&externalSymbols[rankingTable[i]];
|
||||
|
||||
sp->cntP.printReport(fp, this);
|
||||
@@ -417,10 +418,10 @@ void leaky::generateReportHTML(FILE *fp, int *countArray, int count)
|
||||
|
||||
// Cut-N-Paste Shell sort from above. The Ranking Table has already been
|
||||
// populated, so we do not have to reinitialize it.
|
||||
for(int mx=usefulSymbols/9, h=581130733; h>0; h/=3) {
|
||||
for(mx=usefulSymbols/9, h=581130733; h>0; h/=3) {
|
||||
if(h<mx) {
|
||||
for(int i = h-1; i<usefulSymbols; i++) {
|
||||
int j, tmp=rankingTable[i], val = externalSymbols[tmp].timerHit;
|
||||
for(i = h-1; i<usefulSymbols; i++) {
|
||||
int j, tmp=rankingTable[i], val = externalSymbols[tmp].timerHit;
|
||||
for(j = i;
|
||||
(j>=h) && (externalSymbols[rankingTable[j-h]].timerHit<val); j-=h) {
|
||||
rankingTable[j] = rankingTable[j-h];
|
||||
@@ -434,7 +435,7 @@ void leaky::generateReportHTML(FILE *fp, int *countArray, int count)
|
||||
fprintf(fp, "<pre>\n");
|
||||
fprintf(fp, "Count Function Name\n");
|
||||
// Now loop for as long as we have timer hits
|
||||
for(int i=0;
|
||||
for(i=0;
|
||||
i<usefulSymbols && externalSymbols[rankingTable[i]].timerHit>0; i++) {
|
||||
|
||||
Symbol *sp=&externalSymbols[rankingTable[i]];
|
||||
|
||||
@@ -73,12 +73,12 @@ struct leaky {
|
||||
malloc_log_entry* firstLogEntry;
|
||||
malloc_log_entry* lastLogEntry;
|
||||
|
||||
u_long stacks;
|
||||
int stacks;
|
||||
|
||||
int sfd;
|
||||
Symbol* externalSymbols;
|
||||
u_int usefulSymbols;
|
||||
u_int numExternalSymbols;
|
||||
int usefulSymbols;
|
||||
int numExternalSymbols;
|
||||
StrSet exclusions;
|
||||
u_long lowestSymbolAddr;
|
||||
u_long highestSymbolAddr;
|
||||
|
||||
Reference in New Issue
Block a user