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;
}
/***************/
--
>From "know your smileys":
y:-) Bad toupee
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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.