Building with Clang 3.7 on both Ubuntu Linux and OS X, against 7.4.1737.
$ clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz
-pthread -DORBIT2=1 -D_REENTRANT -I/usr/include/libgnomeui-2.0
-I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1
-I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0
-I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0
-I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0
-I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0
-I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/atk-1.0
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo
-I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12
-O2 -Wall -Wextra -fstack-protector -fstack-protector-all -pipe -mtune=native
-DNDEBUG -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -I/usr/include/python2.7
-DPYTHON_HOME='"/usr"' -pthread -DDYNAMIC_PYTHON_DLL=\"libpython2.7.so.1.0\"
-o objects/if_python.o if_python.c
In file included from if_python.c:829:
./if_py_both.h:6078:9: warning: variable 'ret' is used uninitialized whenever
'if' condition is true [-Wsometimes-uninitialized]
if (PyType_IsSubtype(obj->ob_type, &ListType))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if_python.c:284:28: note: expanded from macro 'PyType_IsSubtype'
# define PyType_IsSubtype dll_PyType_IsSubtype
^
./if_py_both.h:6094:12: note: uninitialized use occurs here
return ret;
^~~
./if_py_both.h:6078:5: note: remove the 'if' if its condition is always false
if (PyType_IsSubtype(obj->ob_type, &ListType))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./if_py_both.h:6073:13: note: initialize the variable 'ret' to silence this
warning
int ret;
^
= 0
1 warning generated.
Patch attached to just initialize "ret" to -1.
--
--
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.
diff --git a/src/if_py_both.h b/src/if_py_both.h
index ceedd4c..b39c781 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -6070,7 +6070,7 @@ ConvertFromPyMapping(PyObject *obj, typval_T *tv)
ConvertFromPySequence(PyObject *obj, typval_T *tv)
{
PyObject *lookup_dict;
- int ret;
+ int ret=-1;
if (!(lookup_dict = PyDict_New()))
return -1;