All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH] ui/gtk: Strip trailing '\n' from error string arguments
Date: Thu, 18 Jan 2024 16:47:28 +0100	[thread overview]
Message-ID: <87v87q8wz3.fsf@pond.sub.org> (raw)
In-Reply-To: <20240118153411.2907-1-philmd@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Thu, 18 Jan 2024 16:34:11 +0100")

Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> error_report() strings should not include trailing newlines.
>
> Noticed running:
>
>   $ spatch \
>     --macro-file scripts/cocci-macro-file.h \
>     --sp-file scripts/coccinelle/err-bad-newline.cocci \
>     --keep-comments --use-gitgrep --dir .
>   ./ui/gtk.c:1094:56:"gtk: unexpected touch event type\n"
>
> Fixes: 5a4cb61ae1 ("ui/gtk: enable backend to send multi-touch events")
> Inspired-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  ui/gtk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 810d7fc796..c819c72a20 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1091,7 +1091,7 @@ static gboolean gd_touch_event(GtkWidget *widget, GdkEventTouch *touch,
>          type = INPUT_MULTI_TOUCH_TYPE_END;
>          break;
>      default:
> -        warn_report("gtk: unexpected touch event type\n");
> +        warn_report("gtk: unexpected touch event type");
>          return FALSE;
>      }

I don't like the error message (drop the "gtk: " prefix or work it into
the message), but that's a separate issue.

Reviewed-by: Markus Armbruster <armbru@redhat.com>



      reply	other threads:[~2024-01-18 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18 15:34 [PATCH] ui/gtk: Strip trailing '\n' from error string arguments Philippe Mathieu-Daudé
2024-01-18 15:47 ` Markus Armbruster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v87q8wz3.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.