From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Samuel Martin <s.martin49@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/cwiid: fix build with gcc >= 14
Date: Tue, 23 Jul 2024 10:54:08 +0200 [thread overview]
Message-ID: <20240723105408.18dd49bf@windsurf> (raw)
In-Reply-To: <20240723083608.701739-1-fontaine.fabrice@gmail.com>
Hello Fabrice,
On Tue, 23 Jul 2024 10:36:08 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> +diff --git a/wminput/plugins/led/led.c b/wminput/plugins/led/led.c
> +index 93b96d9..723a2db 100644
> +--- a/wminput/plugins/led/led.c
> ++++ b/wminput/plugins/led/led.c
> +@@ -83,7 +83,7 @@ struct wmplugin_data *wmplugin_exec(int mesg_count, union cwiid_mesg mesg[])
> + btn_mesg = NULL;
> + for (i=0; i < mesg_count; i++) {
> + if (mesg[i].type == CWIID_MESG_BTN) {
> +- btn_mesg = &mesg[i].btn_mesg;
> ++ btn_mesg = (struct cwiid_btn_message *) &mesg[i].btn_mesg;
> + button = mesg[i].btn_mesg.buttons;
Thanks for looking into this. However, do you have some evidence that
it is correct to cast cabbage into carrots?
I.e, why is it correct to cast a struct cwiid_btn_mesg into a struct
cwiid_btn_message ?
Thanks,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-07-23 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 8:36 [Buildroot] [PATCH 1/1] package/cwiid: fix build with gcc >= 14 Fabrice Fontaine
2024-07-23 8:54 ` Thomas Petazzoni via buildroot [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=20240723105408.18dd49bf@windsurf \
--to=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=s.martin49@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox