From d49942867bbeb4ce3c4c89c0224fc4c828452f67 Mon Sep 17 00:00:00 2001 From: Rob Gill Date: Mon, 28 Jan 2019 13:52:21 +1000 Subject: [PATCH] apps/magnify Fix PVS897 through PVS901 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * replace unformatted printf with puts Change-Id: I34eedc08ae9e1e83cb43b4359c557ae6078becb9 Reviewed-on: https://review.haiku-os.org/c/960 Reviewed-by: Adrien Destugues Reviewed-by: Jérôme Duval --- src/apps/magnify/Magnify.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/apps/magnify/Magnify.cpp b/src/apps/magnify/Magnify.cpp index 949f538d82..ecf8232b27 100644 --- a/src/apps/magnify/Magnify.cpp +++ b/src/apps/magnify/Magnify.cpp @@ -1706,7 +1706,7 @@ TMagnify::CopyImage() BMessage *message = be_clipboard->Data(); 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")); return; } @@ -1991,7 +1991,7 @@ TOSMagnify::CreateImage(BPoint mouseLoc, bool force) } Window()->Unlock(); } else - printf("window problem\n"); + puts("window problem"); return created; } @@ -2156,8 +2156,8 @@ main(int argc, char* argv[]) int32 pixelCount = -1; if (argc > 2) { - printf(B_TRANSLATE_CONTEXT( - "usage: magnify [size] (magnify size * size pixels)\n", + puts(B_TRANSLATE_CONTEXT( + "usage: magnify [size] (magnify size * size pixels)", "Console")); exit(1); } else { @@ -2165,18 +2165,18 @@ main(int argc, char* argv[]) pixelCount = abs(atoi(argv[1])); if ((pixelCount > 100) || (pixelCount < 4)) { - printf(B_TRANSLATE_CONTEXT( - "usage: magnify [size] (magnify size * size pixels)\n", + puts(B_TRANSLATE_CONTEXT( + "usage: magnify [size] (magnify size * size pixels)", "Console")); - printf(B_TRANSLATE_CONTEXT( - " size must be > 4 and a multiple of 4\n", + puts(B_TRANSLATE_CONTEXT( + " size must be > 4 and a multiple of 4", "Console")); exit(1); } if (pixelCount % 4) { - printf(B_TRANSLATE_CONTEXT( - "magnify: size must be a multiple of 4\n", + puts(B_TRANSLATE_CONTEXT( + "magnify: size must be a multiple of 4", "Console")); exit(1); }