[PATCH weston] compositor-fbdev: enumerate available fbdevs using udev

Ryo Munakata ryomnktml at gmail.com
Wed Mar 11 09:04:10 PDT 2015


2015/03/12 0:40 "Ryo Munakata" <ryomnktml at gmail.com>:
>
> On Wed, 11 Mar 2015 16:05:55 +0200
> Pekka Paalanen <ppaalanen at gmail.com> wrote:
>
> > On Tue, 10 Mar 2015 11:34:45 +0900
> > Ryo Munakata <ryomnktml at gmail.com> wrote:
> > > +
> > >  struct fbdev_compositor {
> > >     struct weston_compositor base;
> > >     uint32_t prev_state;
> > > @@ -690,6 +692,9 @@ fbdev_output_destroy(struct weston_output *base)
> > >             gl_renderer->output_destroy(base);
> > >     }
> > >
> > > +   if (output->device)
> > > +           free((char *)output->device);
> >
> > No need to cast. Also no need for 'if' because free(NULL) is perfectly
> > legal.
>
> This cast causes a warning like:
>  src/compositor-fbdev.c:696:7: warning: passing argument 1 of ‘free’
discards ‘const’ qualifier from pointer target type
> I think we need it for silencing the warning.
> What do you think?

Typo.
Correctly, free(output->device), which is without the cast, causes the
waring above.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150312/411f5c9a/attachment.html>


More information about the wayland-devel mailing list