* ir-keytable compiler warnings
@ 2019-09-02 12:42 Hans Verkuil
2019-09-02 13:00 ` Sean Young
0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2019-09-02 12:42 UTC (permalink / raw)
To: Sean Young; +Cc: Linux Media Mailing List
Hi Sean,
I get these compiler warnings:
CC keymap.o
keytable.c:1832:76: warning: ‘struct toml_table_t’ declared inside parameter list will not be visible outside of this definition or
declaration
1832 | static void attach_bpf(const char *lirc_name, const char *bpf_prog, struct toml_table_t *toml)
| ^~~~~~~~~~~~
keytable.c: In function ‘main’:
keytable.c:2108:42: warning: passing argument 3 of ‘attach_bpf’ from incompatible pointer type [-Wincompatible-pointer-types]
2108 | attach_bpf(rc_dev.lirc_name, fname, b->param);
| ~^~~~~~~
| |
| struct protocol_param *
keytable.c:1832:90: note: expected ‘struct toml_table_t *’ but argument is of type ‘struct protocol_param *’
1832 | static void attach_bpf(const char *lirc_name, const char *bpf_prog, struct toml_table_t *toml)
| ~~~~~~~~~~~~~~~~~~~~~^~~~
CCLD ir-keytable
It's with gcc 9.2.
Can you take a look?
Regards,
Hans
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ir-keytable compiler warnings
2019-09-02 12:42 ir-keytable compiler warnings Hans Verkuil
@ 2019-09-02 13:00 ` Sean Young
0 siblings, 0 replies; 2+ messages in thread
From: Sean Young @ 2019-09-02 13:00 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Linux Media Mailing List
Hi Hans,
On Mon, Sep 02, 2019 at 02:42:45PM +0200, Hans Verkuil wrote:
> I get these compiler warnings:
>
> CC keymap.o
> keytable.c:1832:76: warning: ‘struct toml_table_t’ declared inside parameter list will not be visible outside of this definition or
> declaration
> 1832 | static void attach_bpf(const char *lirc_name, const char *bpf_prog, struct toml_table_t *toml)
> | ^~~~~~~~~~~~
> keytable.c: In function ‘main’:
> keytable.c:2108:42: warning: passing argument 3 of ‘attach_bpf’ from incompatible pointer type [-Wincompatible-pointer-types]
>
> 2108 | attach_bpf(rc_dev.lirc_name, fname, b->param);
> | ~^~~~~~~
> | |
> | struct protocol_param *
> keytable.c:1832:90: note: expected ‘struct toml_table_t *’ but argument is of type ‘struct protocol_param *’
> 1832 | static void attach_bpf(const char *lirc_name, const char *bpf_prog, struct toml_table_t *toml)
> | ~~~~~~~~~~~~~~~~~~~~~^~~~
> CCLD ir-keytable
>
> It's with gcc 9.2.
>
> Can you take a look?
I've pushed a fix. I had not tested building without the BPF enabled (when
clang and elfutils-libelf-devel are not installed on Fedora).
Sean
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-02 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 12:42 ir-keytable compiler warnings Hans Verkuil
2019-09-02 13:00 ` Sean Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).