Update of /cvsroot/perfparse/_perfparse/cgi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16308/cgi
Modified Files:
perfgant.c
Log Message:
fix more compiler warnings
Index: perfgant.c
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/cgi/perfgant.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** perfgant.c 27 Apr 2007 21:20:06 -0000 1.3
--- perfgant.c 27 Apr 2007 21:25:45 -0000 1.4
***************
*** 158,162 ****
double d;
int i;
! unsigned char s[20];
struct tm *r;
time_t t;
--- 158,162 ----
double d;
int i;
! char s[20];
struct tm *r;
time_t t;
***************
*** 170,175 ****
gdImageLine(gant, (int)d, iBorder, (int)d, iHeight - iBorder, grey2);
sprintf(s, "%02d:00", i);
! gdImageString(gant, gdFontSmall, (int)d - 15, iBorder - 13, s, black);
! gdImageString(gant, gdFontSmall, (int)d - 15, iHeight - 30, s, black);
} else {
gdImageLine(gant, (int)d, iBorder, (int)d, iHeight - iBorder, grey1);
--- 170,175 ----
gdImageLine(gant, (int)d, iBorder, (int)d, iHeight - iBorder, grey2);
sprintf(s, "%02d:00", i);
! gdImageString(gant, gdFontSmall, (int)d - 15, iBorder - 13,(unsigned char*) s, black);
! gdImageString(gant, gdFontSmall, (int)d - 15, iHeight - 30,(unsigned char*) s, black);
} else {
gdImageLine(gant, (int)d, iBorder, (int)d, iHeight - iBorder, grey1);
***************
*** 183,187 ****
// sprintf(s, "%04d-%02d-%02d", r->tm_year + 1900, r->tm_mon + 1, r->tm_mday);
sprintf(s, "%02d-%02d", r->tm_mon + 1, r->tm_mday);
! gdImageString(gant, gdFontSmall, 8, i * (iRowHeight + iRowGap) + iBorder + 12, s, black);
switch (r->tm_wday) {
case 0: strncpy(s, _("Sun"),4); break;
--- 183,187 ----
// sprintf(s, "%04d-%02d-%02d", r->tm_year + 1900, r->tm_mon + 1, r->tm_mday);
sprintf(s, "%02d-%02d", r->tm_mon + 1, r->tm_mday);
! gdImageString(gant, gdFontSmall, 8, i * (iRowHeight + iRowGap) + iBorder + 12,(unsigned char*) s, black);
switch (r->tm_wday) {
case 0: strncpy(s, _("Sun"),4); break;
***************
*** 193,197 ****
case 6: strncpy(s, _("Sat"),4); break;
}
! gdImageString(gant, gdFontSmall, iWidth - iSideBorder + 15, i * (iRowHeight + iRowGap) + iBorder + 12, s, black);
}
--- 193,197 ----
case 6: strncpy(s, _("Sat"),4); break;
}
! gdImageString(gant, gdFontSmall, iWidth - iSideBorder + 15, i * (iRowHeight + iRowGap) + iBorder + 12,(unsigned char*) s, black);
}
***************
*** 394,398 ****
gdImageFilledRectangle(gant, x, 4, x + 20, 13, iStateColour[i]);
gdImageRectangle(gant, x, 4, x + 20, 13, black);
! gdImageString(gant, gdFontSmall, x + 25, 1, sStates[i], black);
}
--- 394,398 ----
gdImageFilledRectangle(gant, x, 4, x + 20, 13, iStateColour[i]);
gdImageRectangle(gant, x, 4, x + 20, 13, black);
! gdImageString(gant, gdFontSmall, x + 25, 1,(unsigned char*) sStates[i], black);
}
***************
*** 451,455 ****
gdImageString(gant, gdFontSmall, 10, 10, (unsigned char*)_("Error:"), black);
! gdImageString(gant, gdFontSmall, 10, 20, sMsg, black);
/* Splurge */
--- 451,455 ----
gdImageString(gant, gdFontSmall, 10, 10, (unsigned char*)_("Error:"), black);
! gdImageString(gant, gdFontSmall, 10, 20, (unsigned char*) sMsg, black);
/* Splurge */
***************
*** 558,565 ****
gdImageString(gant, gdFontSmall, 10, 10, (unsigned char*)_("SQL:"), black);
! gdImageString(gant, gdFontSmall, 10, 20, tmpSQL, black);
gdImageString(gant, gdFontSmall, 10, 40, (unsigned char*)_("Error:"), black);
! gdImageString(gant, gdFontSmall, 10, 50, tmpError, black);
g_free(tmpSQL);
--- 558,565 ----
gdImageString(gant, gdFontSmall, 10, 10, (unsigned char*)_("SQL:"), black);
! gdImageString(gant, gdFontSmall, 10, 20, (unsigned char*) tmpSQL, black);
gdImageString(gant, gdFontSmall, 10, 40, (unsigned char*)_("Error:"), black);
! gdImageString(gant, gdFontSmall, 10, 50, (unsigned char*) tmpError, black);
g_free(tmpSQL);
|