Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warning in cf3/ui/graphics/PythonPreCompiler.cpp #214

Open
wdeconinck opened this issue May 25, 2012 · 0 comments
Open

Compilation warning in cf3/ui/graphics/PythonPreCompiler.cpp #214

wdeconinck opened this issue May 25, 2012 · 0 comments
Assignees

Comments

@wdeconinck
Copy link
Member

The warning goes as follows:

/Users/willem/workspace/coolfluid3/stable/kernel/cf3/ui/graphics/PythonPreCompiler.cpp:54:1: warning: control may reach end of non-void function [-Wreturn-type]

The function this is about is listed :

const QString PythonPreCompiler::try_compile(const QString & line) const {
  boost::python::handle<> src=boost::python::handle<>(boost::python::allow_null(Py_CompileString(line.toStdString().c_str(), "test", Py_single_input)));
  if (NULL != src.get())
    return "";
  PyObject *exc,*val,*trb,*obj;
  char* error;
  PyErr_Fetch(&exc, &val, &trb);
  if (NULL != val){
    if (PyArg_ParseTuple (val, "sO", &error, &obj)){
      return error;
    }else{
      const char* val_str=PyString_AsString(PyObject_Str(val));
      return val_str;
    }
  }
  PyErr_Clear();
}

I would fix it myself, but don't know what the return of this function should be.
Please fix this Vivian :)

@ghost ghost assigned vivianbolsee May 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants