[fixed] new compiler warning in pathpyimp.cpp

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[fixed] new compiler warning in pathpyimp.cpp

Post by uwestoehr »

After git commit 8adadcf2c I get now this compilation warning:

Code: Select all

d:\freecadgit\src\mod\path\app\pathpyimp.cpp(198): warning C4715: 'Path::PathPy::getCycleTime': not all control paths return a value
Could you please have a look?
dubstar-04 wrote: .
sliptonic wrote: .
Last edited by uwestoehr on Sat Apr 25, 2020 4:20 pm, edited 1 time in total.
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: new compiler warning in pathpyimp.cpp

Post by dubstar-04 »

uwestoehr wrote: Thu Apr 23, 2020 1:10 am After git commit 8adadcf2c I get now this compilation warning:

Could you please have a look?
This is a silly oversight in the python declaration:

Code: Select all

PyObject* PathPy::getCycleTime(PyObject * args)
{
    double hFeed, vFeed, hRapid, vRapid;
    if (PyArg_ParseTuple(args, "dddd", &hFeed, &vFeed, &hRapid, &vRapid)){
    	return PyFloat_FromDouble(getToolpathPtr()->getCycleTime(hFeed, vFeed, hRapid, vRapid));
    }
}
This needs to return 0 outside the if statement.

I will fix it later and make a pull request.

Sorry about that,

Dan
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: new compiler warning in pathpyimp.cpp

Post by dubstar-04 »

User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: new compiler warning in pathpyimp.cpp

Post by uwestoehr »

dubstar-04 wrote: Thu Apr 23, 2020 5:18 pm PR Here: https://github.com/FreeCAD/FreeCAD/pull/3386
Confirmed fixed. Thanks.
Post Reply