Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Re: [PATCH] Fix some warnings due to GCC8's
      cast-function-type (Peter Meerwald-Stadler)


----------------------------------------------------------------------

Message: 1
Date: Fri, 5 Oct 2018 14:57:50 +0200 (CEST)
From: Peter Meerwald-Stadler <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH] Fix some warnings due to GCC8's
        cast-function-type
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

Hello Daniel,

> On 10/03/2018 04:10 PM, Peter Meerwald-Stadler wrote:
> > --- a/gweb/giognutls.c
> > +++ b/gweb/giognutls.c
> > @@ -304,7 +304,7 @@ static gboolean g_io_gnutls_dispatch(GSource *source,
> > GSourceFunc callback,
> >                                                     gpointer user_data)
> >   {
> >     GIOGnuTLSWatch *watch = (GIOGnuTLSWatch *) source;
> > -   GIOFunc func = (GIOFunc) callback;
> > +   GIOFunc func = (GIOFunc) (void (*) (void)) callback;
> 
> Stupid question: wouldn't a cast to (void *) be not enough?

because that would result in another GCC 8 warning:
warning: ISO C forbids conversion of function pointer to object pointer type 
[-Wpedantic]
 
> I don't have a current gcc around, guess I need to update my machine...

you can try godbolt.org, it has gcc 8.1:
https://godbolt.org/z/ZSRCVp

regards, p.


-- 

Peter Meerwald-Stadler
Mobile: +43 664 24 44 418


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 36, Issue 7
**************************************

Reply via email to