[virt-tools-list] [virt-viewer] session-vnc: Avoid depracated warnings on this file

Fabiano Fidêncio fabiano at fidencio.org
Fri Feb 26 18:31:13 UTC 2016


On Feb 26, 2016 18:54, "Jonathon Jongsma" <jjongsma at redhat.com> wrote:
>
> On Fri, 2016-02-26 at 18:50 +0100, Fabiano Fidêncio wrote:
> > On Fri, Feb 26, 2016 at 5:57 PM, Jonathon Jongsma <jjongsma at redhat.com>
wrote:
> > >
> > >
> > > On Fri, 2016-02-26 at 17:26 +0100, Pavel Grunt wrote:
> > > > On Fri, 2016-02-26 at 17:22 +0100, Fabiano Fidêncio wrote:
> > > > > This is a temporary solution for using autobuild.sh, as commit
> > > > > df403f5
> > > > > introduced the -Wdeprecated-declarations and gtk-vnc provides
> > > > > callbacks
> > > > > using a deprecated structure (GValueArray), forcing virt-viewer to
> > > > > keep
> > > > > using deprecated methods (g_value_array_*).
> > > > >
> > > > > Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> > > >
> > > > Acked-by: Pavel Grunt <pgrunt at redhat.com>
> > >
> > >
> > > perhaps worth adding a comment to the code explaining why this is used
> > > though?
> >
> > (...) and gtk-vnc provides callbacks for getting authentication
> > credentials which makes use of GValueArray, forcing virt-viewer to
> > keep using deprecated methods like g_value_array_get_nth().
> >
> > Does it work for you, Jonathon?
>
>
> For me it can be as simple as:
>
> /* gtk-vnc uses deprecated API, so disable warnings for this file */

I am going for your suggestion, thanks.

>
> But yours works too.
>
>
> >
> > >
> > >
> > > >
> > > > > ---
> > > > >  src/virt-viewer-session-vnc.c | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git a/src/virt-viewer-session-vnc.c
b/src/virt-viewer-session-
> > > > > vnc.c
> > > > > index 3321fc2..ccb08b2 100644
> > > > > --- a/src/virt-viewer-session-vnc.c
> > > > > +++ b/src/virt-viewer-session-vnc.c
> > > > > @@ -24,6 +24,8 @@
> > > > >
> > > > >  #include <config.h>
> > > > >
> > > > > +#define GLIB_DISABLE_DEPRECATION_WARNINGS
> > > > > +
> > > > >  #include "virt-viewer-auth.h"
> > > > >  #include "virt-viewer-session-vnc.h"
> > > > >  #include "virt-viewer-display-vnc.h"
> > > >
> > > > _______________________________________________
> > > > virt-tools-list mailing list
> > > > virt-tools-list at redhat.com
> > > > https://www.redhat.com/mailman/listinfo/virt-tools-list
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20160226/f7dfdf27/attachment.htm>


More information about the virt-tools-list mailing list