* [PATCH] ui/gtk: Strip trailing '\n' from error string arguments
@ 2024-01-18 15:34 Philippe Mathieu-Daudé
2024-01-18 15:47 ` Markus Armbruster
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-18 15:34 UTC (permalink / raw)
To: qemu-devel
Cc: Gerd Hoffmann, Markus Armbruster, Marc-André Lureau,
Philippe Mathieu-Daudé, Peter Maydell
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;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ui/gtk: Strip trailing '\n' from error string arguments
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
0 siblings, 0 replies; 2+ messages in thread
From: Markus Armbruster @ 2024-01-18 15:47 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Gerd Hoffmann, Marc-André Lureau, Peter Maydell
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-18 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.