epics-base / pvaClientCPP

pvaClientCPP is an EPICS V4 C++ module
http://epics-pvdata.sourceforge.net/index.html
Other
2 stars 8 forks source link

another attempt to fix issue 31 #33

Closed mrkraimer closed 8 years ago

anjohnson commented 8 years ago

The warnings I'm seeing are only coming from the VxWorks 6.8 compiler (which is an older version of gcc), and their line numbers have changed since your documentation updates. After your latest commits the extraneous epicsShareClass keywords are now on these lines:

../pv/pvaClient.h:1398: warning: type attributes are honored only at type definition
../pv/pvaClient.h:1535: warning: type attributes are honored only at type definition

i.e. they refer to these two declarations:

class epicsShareClass MonitorRequesterImpl;
class epicsShareClass RPCRequesterImpl;

The non-virtual destructor warnings are now

../pv/pvaClient.h:1407: warning: 'class epics::pvaClient::PvaClientMonitor' has virtual functions but non-virtual destructor
../pv/pvaClient.h:1544: warning: 'class epics::pvaClient::PvaClientRPC' has virtual functions but non-virtual destructor

Your PvaClientMonitor and PvaClientRPC classes are both derived from an enable_shared_from_this<> template class; if an object gets deleted through a shared pointer, shouldn't it use the correct virtual destructor?

mrkraimer commented 8 years ago

On 07/19/2016 03:27 PM, Andrew Johnson wrote:

The warnings I'm seeing are only coming from the VxWorks 6.8 compiler (which is an older version of gcc), and their line numbers have changed since your documentation updates. After your latest commits the extraneous |epicsShareClass| keywords are now on these lines:

|../pv/pvaClient.h:1398: warning: type attributes are honored only at type definition ../pv/pvaClient.h:1535: warning: type attributes are honored only at type definition |

i.e. they refer to these two declarations:

|class epicsShareClass MonitorRequesterImpl; class epicsShareClass RPCRequesterImpl; |

The non-virtual destructor warnings are now

|../pv/pvaClient.h:1407: warning: 'class epics::pvaClient::PvaClientMonitor' has virtual functions but non-virtual destructor ../pv/pvaClient.h:1544: warning: 'class epics::pvaClient::PvaClientRPC' has virtual functions but non-virtual destructor |

Your PvaClientMonitor and PvaClientRPC classes are both derived from an enable_shared_from_this<> template class; if an object gets deleted through a shared pointer, shouldn't it use the correct virtual destructor?

I now know what to look for. In https://jenkins.aps.anl.gov/view/EPICS%20V4/

I look at column "Compiler Warnings" The goal is to make this 0 in all my projects.

I will start working to achieve the goal.

Marty

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/epics-base/pvaClientCPP/pull/33#issuecomment-233739596, or mute the thread https://github.com/notifications/unsubscribe-auth/AF1Q1oO9Qhv3kdSimjhVKPYeciP1U0MBks5qXSUZgaJpZM4JQEfu.

anjohnson commented 8 years ago

On 07/19/2016 02:39 PM, Marty Kraimer wrote:

I now know what to look for. In https://jenkins.aps.anl.gov/view/EPICS%20V4/

I look at column "Compiler Warnings" The goal is to make this 0 in all my projects.

I will start working to achieve the goal.

Don't worry about the build warnings from the -win64 jobs, the MS compiler generates some really obscure warnings that you probably won't be able to remove anyway, although the -win64s job warnings probably are worth looking at. I just created VxWorks and RTEMS build jobs for pvaClient, they didn't exist before today.

Thanks, and sorry for any confusion I may have caused.

Arguing for surveillance because you have nothing to hide is no different than making the claim, "I don't care about freedom of speech because I have nothing to say." -- Edward Snowdon