neutrino: fix 32<->64bit format string warnings

use portable C99 format string macros for 64bit types to
fix many warnings when compiling for 64bit architectures,
add some (int) casts for size_t
This commit is contained in:
Stefan Seyfried
2012-11-03 13:56:26 +01:00
parent 13714e7f36
commit e0acbd3ddb
41 changed files with 208 additions and 233 deletions

View File

@@ -387,7 +387,7 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
break;
case NeutrinoMessages::EVT_SCAN_NUM_TRANSPONDERS:
sprintf(buffer, "%d", data);
sprintf(buffer, "%ld", data);
paintLine(xpos2, ypos_transponder, w - (8*fw), buffer);
total = data;
snprintf(str, sizeof(buffer), "scan: %d/%d", done, total);
@@ -405,7 +405,7 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCY:
freqready = 1;
sprintf(buffer, "%u", data);
sprintf(buffer, "%lu", data);
xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true);
paintLine(xpos2, ypos_frequency, xpos_frequency, buffer);
//paintRadar();
@@ -433,22 +433,22 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
break;
case NeutrinoMessages::EVT_SCAN_NUM_CHANNELS:
sprintf(buffer, " = %d", data);
sprintf(buffer, " = %ld", data);
paintLine(xpos1 + 3 * (6*fw), ypos_service_numbers + mheight, width - 3 * (6*fw) - 10, buffer);
break;
case NeutrinoMessages::EVT_SCAN_FOUND_TV_CHAN:
sprintf(buffer, "%d", data);
sprintf(buffer, "%ld", data);
paintLine(xpos1, ypos_service_numbers + mheight, (6*fw), buffer);
break;
case NeutrinoMessages::EVT_SCAN_FOUND_RADIO_CHAN:
sprintf(buffer, "%d", data);
sprintf(buffer, "%ld", data);
paintLine(xpos1 + (6*fw), ypos_service_numbers + mheight, (6*fw), buffer);
break;
case NeutrinoMessages::EVT_SCAN_FOUND_DATA_CHAN:
sprintf(buffer, "%d", data);
sprintf(buffer, "%ld", data);
paintLine(xpos1 + 2 * (6*fw), ypos_service_numbers + mheight, (6*fw), buffer);
break;