From: Florian G. <re...@us...> - 2007-04-27 21:20:10
|
Update of /cvsroot/perfparse/_perfparse/cgi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13965/cgi Modified Files: perfchart.c perfgant.c Log Message: fix compiler warnings Index: perfgant.c =================================================================== RCS file: /cvsroot/perfparse/_perfparse/cgi/perfgant.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perfgant.c 20 Dec 2006 22:57:45 -0000 1.2 --- perfgant.c 27 Apr 2007 21:20:06 -0000 1.3 *************** *** 158,162 **** double d; int i; ! char s[20]; struct tm *r; time_t t; --- 158,162 ---- double d; int i; ! unsigned char s[20]; struct tm *r; time_t t; *************** *** 573,577 **** } - - - --- 573,574 ---- Index: perfchart.c =================================================================== RCS file: /cvsroot/perfparse/_perfparse/cgi/perfchart.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** perfchart.c 20 Dec 2006 22:57:45 -0000 1.8 --- perfchart.c 27 Apr 2007 21:20:06 -0000 1.9 *************** *** 596,600 **** /* Key */ if (bVal) { ! gdImageString(graph, gdFontSmall, i, yTop + 2, "Value", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, black); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, black); --- 596,600 ---- /* Key */ if (bVal) { ! gdImageString(graph, gdFontSmall, i, yTop + 2,(unsigned char *) "Value", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, black); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, black); *************** *** 602,606 **** } if (bSmooth) { ! gdImageString(graph, gdFontSmall, i, yTop + 2, "Smooth", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, blue); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, blue); --- 602,606 ---- } if (bSmooth) { ! gdImageString(graph, gdFontSmall, i, yTop + 2,(unsigned char *) "Smooth", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, blue); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, blue); *************** *** 608,612 **** } if (bStanDev) { ! gdImageString(graph, gdFontSmall, i, yTop + 2, "S.Dev", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, lblue); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, lblue); --- 608,612 ---- } if (bStanDev) { ! gdImageString(graph, gdFontSmall, i, yTop + 2,(unsigned char *) "S.Dev", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, lblue); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, lblue); *************** *** 614,618 **** } if (bWarn) { ! gdImageString(graph, gdFontSmall, i, yTop + 2, "Warn", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, yellow); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, yellow); --- 614,618 ---- } if (bWarn) { ! gdImageString(graph, gdFontSmall, i, yTop + 2,(unsigned char *) "Warn", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, yellow); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, yellow); *************** *** 620,624 **** } if (bCrit) { ! gdImageString(graph, gdFontSmall, i, yTop + 2, "Crit", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, red); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, red); --- 620,624 ---- } if (bCrit) { ! gdImageString(graph, gdFontSmall, i, yTop + 2,(unsigned char *) "Crit", black); gdImageLine(graph, i + 40, yTop + 8, i + 60, yTop + 8, red); gdImageLine(graph, i + 40, yTop + 9, i + 60, yTop + 9, red); *************** *** 630,634 **** /* Version */ sprintf(sLabel, "v%s", VERSION); ! gdImageString(graph, gdFontSmall, 5, iHeight - 14, sLabel, black); /* Unit */ --- 630,634 ---- /* Version */ sprintf(sLabel, "v%s", VERSION); ! gdImageString(graph, gdFontSmall, 5, iHeight - 14,(unsigned char*) sLabel, black); /* Unit */ *************** *** 646,650 **** break; } ! gdImageString(graph, gdFontSmall, 5, iHeight - 28, sLabel, black); } --- 646,650 ---- break; } ! gdImageString(graph, gdFontSmall, 5, iHeight - 28,(unsigned char*) sLabel, black); } *************** *** 657,661 **** } iTitleLeft = iWidth / 2 - (int)((double)strlen(sTitle) * 3.5); ! gdImageString(graph, gdFontMediumBold, iTitleLeft, 6, sTitle, black); } --- 657,661 ---- } iTitleLeft = iWidth / 2 - (int)((double)strlen(sTitle) * 3.5); ! gdImageString(graph, gdFontMediumBold, iTitleLeft, 6,(unsigned char*) sTitle, black); } *************** *** 1027,1031 **** sprintf(sLabel, "%.0f%%", p * 100); ! gdImageString(graph, gdFontSmall, 5, y - 6, sLabel, black); } --- 1027,1031 ---- sprintf(sLabel, "%.0f%%", p * 100); ! gdImageString(graph, gdFontSmall, 5, y - 6,(unsigned char*) sLabel, black); } *************** *** 1097,1101 **** #endif ! gdImageString(graph, gdFontSmall, 5, y - 6, sLabel, black); i += iScaleYDelta0; --- 1097,1101 ---- #endif ! gdImageString(graph, gdFontSmall, 5, y - 6,(unsigned char*) sLabel, black); i += iScaleYDelta0; *************** *** 1119,1123 **** x = xTranslate(t); sprintf(sLabel, "%02ld", t / 3600); ! gdImageString(graph, gdFontSmall, x - 6, iHeight - iBotBorder + 2, sLabel, black); } --- 1119,1123 ---- x = xTranslate(t); sprintf(sLabel, "%02ld", t / 3600); ! gdImageString(graph, gdFontSmall, x - 6, iHeight - iBotBorder + 2,(unsigned char*) sLabel, black); } *************** *** 1155,1159 **** lt = localtime(&t); sprintf(sLabel, "%04d-%02d-%02d", lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday); ! gdImageString(graph, gdFontSmall, x - 30, iHeight - iBotBorder + 12, sLabel, black); } else { --- 1155,1159 ---- lt = localtime(&t); sprintf(sLabel, "%04d-%02d-%02d", lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday); ! gdImageString(graph, gdFontSmall, x - 30, iHeight - iBotBorder + 12,(unsigned char*) sLabel, black); } else { *************** *** 1161,1167 **** lt = localtime(&t); sprintf(sLabel, "%04d-", lt->tm_year + 1900); ! gdImageString(graph, gdFontSmall, x - 13, iHeight - iBotBorder + 2, sLabel, black); sprintf(sLabel, "%02d-%02d", lt->tm_mon + 1, lt->tm_mday); ! gdImageString(graph, gdFontSmall, x - 13, iHeight - iBotBorder + 12, sLabel, black); } --- 1161,1167 ---- lt = localtime(&t); sprintf(sLabel, "%04d-", lt->tm_year + 1900); ! gdImageString(graph, gdFontSmall, x - 13, iHeight - iBotBorder + 2,(unsigned char*) sLabel, black); sprintf(sLabel, "%02d-%02d", lt->tm_mon + 1, lt->tm_mday); ! gdImageString(graph, gdFontSmall, x - 13, iHeight - iBotBorder + 12,(unsigned char*) sLabel, black); } *************** *** 1214,1218 **** if (x < iBorder * 2) continue; sprintf(sLabel, "%02ld", ((t - tFromMidnight) % (3600 * 24)) / 3600); ! gdImageString(graph, gdFontSmall, x - 6, iHeight - iBotBorder + 2, sLabel, black); } --- 1214,1218 ---- if (x < iBorder * 2) continue; sprintf(sLabel, "%02ld", ((t - tFromMidnight) % (3600 * 24)) / 3600); ! gdImageString(graph, gdFontSmall, x - 6, iHeight - iBotBorder + 2,(unsigned char*) sLabel, black); } *************** *** 1268,1272 **** if (x < iBorder * 2) continue; sprintf(sLabel, "%02ld:%02ld", ((t - tFromMidnight) % (3600 * 24)) / 3600, (t / 60) % 60); ! gdImageString(graph, gdFontSmall, x - 15, iHeight - iBotBorder + 12, sLabel, black); } --- 1268,1272 ---- if (x < iBorder * 2) continue; sprintf(sLabel, "%02ld:%02ld", ((t - tFromMidnight) % (3600 * 24)) / 3600, (t / 60) % 60); ! gdImageString(graph, gdFontSmall, x - 15, iHeight - iBotBorder + 12,(unsigned char*) sLabel, black); } *************** *** 1640,1644 **** gdImageString(graph, gdFontSmall, 10, 10, (unsigned char*)_("Error:"), black); ! gdImageString(graph, gdFontSmall, 10, 20, sMsg, black); /* Splurge */ --- 1640,1644 ---- gdImageString(graph, gdFontSmall, 10, 10, (unsigned char*)_("Error:"), black); ! gdImageString(graph, gdFontSmall, 10, 20,(unsigned char*) sMsg, black); /* Splurge */ *************** *** 1772,1779 **** gdImageString(graph, gdFontSmall, 10, 10, (unsigned char*)_("SQL:"), black); ! gdImageString(graph, gdFontSmall, 10, 20, tmpSQL, black); gdImageString(graph, gdFontSmall, 10, 40, (unsigned char*)_("Error:"), black); ! gdImageString(graph, gdFontSmall, 10, 50, tmpError, black); g_free(tmpSQL); --- 1772,1779 ---- gdImageString(graph, gdFontSmall, 10, 10, (unsigned char*)_("SQL:"), black); ! gdImageString(graph, gdFontSmall, 10, 20, (unsigned char*) tmpSQL, black); gdImageString(graph, gdFontSmall, 10, 40, (unsigned char*)_("Error:"), black); ! gdImageString(graph, gdFontSmall, 10, 50, (unsigned char*) tmpError, black); g_free(tmpSQL); *************** *** 1949,1953 **** } - - - --- 1949,1950 ---- |