apps/magnify Fix PVS897 through PVS901

* 	replace unformatted printf with puts

Change-Id: I34eedc08ae9e1e83cb43b4359c557ae6078becb9
Reviewed-on: https://review.haiku-os.org/c/960
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
Rob Gill 2019-01-28 13:52:21 +10:00 committed by waddlesplash
parent 99fe9c42da
commit d49942867b

View File

@ -1706,7 +1706,7 @@ TMagnify::CopyImage()
BMessage *message = be_clipboard->Data(); BMessage *message = be_clipboard->Data();
if (!message) { if (!message) {
printf(B_TRANSLATE_CONTEXT("no clip msg\n", puts(B_TRANSLATE_CONTEXT("no clip msg",
"In console, when clipboard is empty after clicking Copy image")); "In console, when clipboard is empty after clicking Copy image"));
return; return;
} }
@ -1991,7 +1991,7 @@ TOSMagnify::CreateImage(BPoint mouseLoc, bool force)
} }
Window()->Unlock(); Window()->Unlock();
} else } else
printf("window problem\n"); puts("window problem");
return created; return created;
} }
@ -2156,8 +2156,8 @@ main(int argc, char* argv[])
int32 pixelCount = -1; int32 pixelCount = -1;
if (argc > 2) { if (argc > 2) {
printf(B_TRANSLATE_CONTEXT( puts(B_TRANSLATE_CONTEXT(
"usage: magnify [size] (magnify size * size pixels)\n", "usage: magnify [size] (magnify size * size pixels)",
"Console")); "Console"));
exit(1); exit(1);
} else { } else {
@ -2165,18 +2165,18 @@ main(int argc, char* argv[])
pixelCount = abs(atoi(argv[1])); pixelCount = abs(atoi(argv[1]));
if ((pixelCount > 100) || (pixelCount < 4)) { if ((pixelCount > 100) || (pixelCount < 4)) {
printf(B_TRANSLATE_CONTEXT( puts(B_TRANSLATE_CONTEXT(
"usage: magnify [size] (magnify size * size pixels)\n", "usage: magnify [size] (magnify size * size pixels)",
"Console")); "Console"));
printf(B_TRANSLATE_CONTEXT( puts(B_TRANSLATE_CONTEXT(
" size must be > 4 and a multiple of 4\n", " size must be > 4 and a multiple of 4",
"Console")); "Console"));
exit(1); exit(1);
} }
if (pixelCount % 4) { if (pixelCount % 4) {
printf(B_TRANSLATE_CONTEXT( puts(B_TRANSLATE_CONTEXT(
"magnify: size must be a multiple of 4\n", "magnify: size must be a multiple of 4",
"Console")); "Console"));
exit(1); exit(1);
} }