TIFFTranslator: Fix -Wformat-security
Change-Id: I598547fcb098ab88b62ffc2762696093b0d0eb3b Reviewed-on: https://review.haiku-os.org/c/haiku/+/3328 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
097d6b9ce3
commit
1af900b16b
@@ -207,8 +207,8 @@ identify_tiff_header(BPositionIO *inSource, BMessage *ioExtension,
|
|||||||
|
|
||||||
if (documentIndex < 1 || documentIndex > documentCount) {
|
if (documentIndex < 1 || documentIndex > documentCount) {
|
||||||
// document index is invalid
|
// document index is invalid
|
||||||
fprintf(stderr, B_TRANSLATE("identify_tiff_header: invalid "
|
fputs(B_TRANSLATE("identify_tiff_header: invalid "
|
||||||
"document index\n"));
|
"document index\n"), stderr);
|
||||||
return B_NO_TRANSLATOR;
|
return B_NO_TRANSLATOR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,8 +216,8 @@ identify_tiff_header(BPositionIO *inSource, BMessage *ioExtension,
|
|||||||
// identify the document the user specified or the first document
|
// identify the document the user specified or the first document
|
||||||
// if the user did not specify which document they wanted to identify
|
// if the user did not specify which document they wanted to identify
|
||||||
if (!TIFFSetDirectory(tif, documentIndex - 1)) {
|
if (!TIFFSetDirectory(tif, documentIndex - 1)) {
|
||||||
fprintf(stderr, B_TRANSLATE("identify_tiff_header: couldn't set "
|
fputs(B_TRANSLATE("identify_tiff_header: couldn't set "
|
||||||
"directory\n"));
|
"directory\n"), stderr);
|
||||||
return B_NO_TRANSLATOR;
|
return B_NO_TRANSLATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,8 +233,8 @@ identify_tiff_header(BPositionIO *inSource, BMessage *ioExtension,
|
|||||||
outInfo->quality = TIFF_IN_QUALITY;
|
outInfo->quality = TIFF_IN_QUALITY;
|
||||||
outInfo->capability = TIFF_IN_CAPABILITY;
|
outInfo->capability = TIFF_IN_CAPABILITY;
|
||||||
strcpy(outInfo->MIME, "image/tiff");
|
strcpy(outInfo->MIME, "image/tiff");
|
||||||
snprintf(outInfo->name, sizeof(outInfo->name),
|
strlcpy(outInfo->name, B_TRANSLATE("TIFF image"),
|
||||||
B_TRANSLATE("TIFF image"));
|
sizeof(outInfo->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!poutTIFF) {
|
if (!poutTIFF) {
|
||||||
@@ -603,7 +603,7 @@ write_tif_stream(TIFF* tif, BPositionIO* inSource, color_space format,
|
|||||||
|
|
||||||
|
|
||||||
TIFFTranslator::TIFFTranslator()
|
TIFFTranslator::TIFFTranslator()
|
||||||
: BaseTranslator(B_TRANSLATE("TIFF images"),
|
: BaseTranslator(B_TRANSLATE("TIFF images"),
|
||||||
B_TRANSLATE("TIFF image translator"),
|
B_TRANSLATE("TIFF image translator"),
|
||||||
TIFF_TRANSLATOR_VERSION,
|
TIFF_TRANSLATOR_VERSION,
|
||||||
sInputFormats, kNumInputFormats,
|
sInputFormats, kNumInputFormats,
|
||||||
@@ -958,6 +958,6 @@ TIFFTranslator::DerivedTranslate(BPositionIO *inSource,
|
|||||||
BView *
|
BView *
|
||||||
TIFFTranslator::NewConfigView(TranslatorSettings *settings)
|
TIFFTranslator::NewConfigView(TranslatorSettings *settings)
|
||||||
{
|
{
|
||||||
return new TIFFView(B_TRANSLATE("TIFFTranslator Settings"),
|
return new TIFFView(B_TRANSLATE("TIFFTranslator Settings"),
|
||||||
B_WILL_DRAW, settings);
|
B_WILL_DRAW, settings);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user