On Wed, Nov 4, 2015 at 7:55 AM, Tony Mechelynck <[email protected]> wrote: > On Tue, Nov 3, 2015 at 10:03 PM, Bram Moolenaar <[email protected]> wrote: >> >> Tony wrote: >> >>> After patches 7.4.904 to .908 I get the following compile warnings: >>> the first one is for using a deprecated declaration defined in a GDK >>> include file, so possibly unavoidable; the other two are for breaking >>> strict aliasing rules in if_py_both.h. An executable is produced. >>> >>> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread >>> -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include >>> -I/usr/i >> [...] >>> -D_REENTRANT=1 -D_THREAD_SAFE=1 -D_LARGEFILE64_SOURCE=1 -o >>> objects/gui_gtk.o gui_gtk.c >>> gui_gtk.c: In function ‘add_stock_icon’: >>> gui_gtk.c:152:5: warning: ‘gdk_pixbuf_new_from_inline’ is deprecated >>> (declared at /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:314) >>> [-Wdeprecated-declarations] >>> pixbuf = gdk_pixbuf_new_from_inline(data_length, inline_data, FALSE, >>> NULL); >>> ^ >> >> I don't know a way to avoid that. >> >>> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread >>> -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include >> [...] >>> -I/usr/include/python2.7 -DPYTHON_HOME='"/usr"' -pthread -fPIE -o >>> objects/if_python.o if_python.c >>> In file included from if_python.c:825:0: >>> if_py_both.h: In function ‘AlwaysFalse’: >>> if_py_both.h:479:5: warning: dereferencing type-punned pointer will >>> break strict-aliasing rules [-Wstrict-aliasing] >>> Py_INCREF(Py_False); >>> ^ >>> if_py_both.h: In function ‘AlwaysTrue’: >>> if_py_both.h:487:5: warning: dereferencing type-punned pointer will >>> break strict-aliasing rules [-Wstrict-aliasing] >>> Py_INCREF(Py_True); >>> ^ >> >> Does this patch fix it: >> >> --- old/if_py_both.h 2015-11-02 13:28:43.589893978 +0100 >> +++ if_py_both.h 2015-11-03 21:36:49.836998968 +0100 >> @@ -476,16 +476,18 @@ >> AlwaysFalse(PyObject *self UNUSED) >> { >> /* do nothing */ >> - Py_INCREF(Py_False); >> - return Py_False; >> + PyObject *ret = Py_False; >> + Py_INCREF(ret); >> + return ret; >> } >> >> static PyObject * >> AlwaysTrue(PyObject *self UNUSED) >> { >> /* do nothing */ >> - Py_INCREF(Py_True); >> - return Py_True; >> + PyObject *ret = Py_True; >> + Py_INCREF(ret); >> + return ret; >> } >> >> /***************/ >> > > > I'll try. Just the time to import the patch on my mq-enabled clone of > the Mercurial repository, then compile the result. > > Best regards, > Tony.
After applying the patch, "make" recompiles pathdef.c, if_python.c and version.c with no compiler messages. Best regards, Tony. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
