fix: printf: some potentially severe format errors

This commit is contained in:
Stéphane Lesimple
2021-01-15 19:41:48 +01:00
parent 66cf0d25ee
commit f68efb758e
6 changed files with 6 additions and 6 deletions

View File

@@ -534,7 +534,7 @@ int main(int argc, char *argv[])
Closure->prefetchSectors = atoi(optarg);
if( Closure->prefetchSectors < 32
|| Closure->prefetchSectors > MAX_PREFETCH_CACHE_SIZE)
Stop(_("--prefetch-sectors must be in range 32...%s"),
Stop(_("--prefetch-sectors must be in range 32...%d"),
MAX_PREFETCH_CACHE_SIZE);
break;
case MODIFIER_RANDOM_SEED:

View File

@@ -114,7 +114,7 @@ void print_crc_block(CrcBlock *cb)
PrintCLI("fpSector %8x\n", cb->fpSector);
print_hex("mediumFP ", cb->mediumFP, 16);
print_hex("mediumSum ", cb->mediumSum, 16);
PrintCLI("dataSectors %ll16x\n ",cb->dataSectors);
PrintCLI("dataSectors %16" PRIx64 "\n",cb->dataSectors);
PrintCLI("inLast %8x\n", cb->inLast);
PrintCLI("dataBytes %8x\n", cb->dataBytes);
PrintCLI("eccBytes %8x\n", cb->eccBytes);

View File

@@ -260,7 +260,7 @@ static ssize_t xwrite(int fdes, void *buf_base, size_t count)
answer = ModalDialog(GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, insert_buttons,
_("Error while writing the file:\n\n%s\n\n"
"You can redo this operation after freeing some space."),
strerror(errno),n);
strerror(errno));
if(!answer) return total;
}

View File

@@ -1490,7 +1490,7 @@ void CreatePreferencesWindow(void)
"- reading defective media\n"
"- if (and only if) error correction data is available.\n\n"
"Using the adaptive strategy without error correction data "
"is possible but it is recommended to use linear reading in that case."), Closure->invisibleDash);
"is possible but it is recommended to use linear reading in that case."));
/* Reading range */

View File

@@ -890,7 +890,7 @@ void ReadMediumLinear(gpointer data)
{
#ifndef CLI
SwitchAndSetFootline(Closure->readLinearNotebook, 1, Closure->readLinearFootline,
_("<span %s>Aborted by user request!</span>"),
_("<span %s>Aborted by user request!</span> %" PRId64 " sectors read, %" PRId64 " sectors unreadable/skipped so far."),
Closure->redMarkup, rc->readOK,Closure->readErrors);
#endif
rc->unreportedError = FALSE; /* suppress respective error message */

View File

@@ -244,7 +244,7 @@ static void check_image(ecc_closure *ec)
"from a damaged medium which was NOT fully recovered.\n"
"This means that some files may have been silently corrupted.\n\n"
"Error correction information can only be\n"
"appended to complete (undamaged) images.\n"));
"appended to complete (undamaged) images.\n"), sectors);
}
/* Update and cache the CRC sums */