diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-06 11:39:05 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-06 10:22:29 +0000 |
commit | 4f4716ace2c114e1565359f5eeacd1cf19542b2d (patch) | |
tree | eea145e960b64d3d404e94c5bbe5a66b924b38c5 /sources/shiboken2/ApiExtractor/typesystem.cpp | |
parent | 58639e47f2ebf1c6b058cfcdcbada52afc43908d (diff) |
shiboken: Initialize converter function to 0
Fix warnings:
QtCore/qmessagelogcontext_wrapper.cpp:265:9: warning: variable 'pythonToCpp' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
QtCore/qmessagelogcontext_wrapper.cpp:271:5: note: uninitialized use occurs here
pythonToCpp(pyIn, &cppOut_local);
^~~~~~~~~~~
QtCore/qmessagelogcontext_wrapper.cpp:265:9: note: remove the '&&' if its condition is always true
if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
QtCore/qmessagelogcontext_wrapper.cpp:264:32: note: initialize the variable 'pythonToCpp' to silence this warning
PythonToCppFunc pythonToCpp;
^
= nullptr
in generated code like:
PythonToCppFunc pythonToCpp;
if (!Shiboken::String::check(pyIn)
&& (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) {
PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'file', 'char' or convertible type expected");
return -1;
}
Change-Id: I4f4f454d32e1a99d26cdf19807a801d98f9256d3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typesystem.cpp')
0 files changed, 0 insertions, 0 deletions