the member variable is initialized in the constructor, but it still report this error .pls see the detail as below.
DunleeCT8000StateContext::DunleeCT8000StateContext()//:mDuleeXsegmentDev(NULL)<--- Member variable 'DunleeCT8000StateContext::mDuleeXsegmentDev' is not initialized in the constructor.
{ m_DuleeXsegmentDev = NULL;
m_StopShotCallBack=boost::function<void ()="">();
m_dfu_comm_send_suc=false;
m_fila_comm_send_suc=false;
}
i want to know how to fix it or if it is a bug?. cppcheck version is v2.8</void>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the class definition is below
class DunleeCT8000StateContext {
public:
funtion1();
funtion2();
...
funtionn();
private:
IDunleeXrayDevice* m_DuleeXsegmentDev
};
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I assume there is a detail in your code that confuses Cppcheck. I would suggest that you reduce your code to find out why Cppcheck writes a false positive.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the member variable is initialized in the constructor, but it still report this error .pls see the detail as below.
DunleeCT8000StateContext::DunleeCT8000StateContext()//:mDuleeXsegmentDev(NULL)<--- Member variable 'DunleeCT8000StateContext::mDuleeXsegmentDev' is not initialized in the constructor.
{
m_DuleeXsegmentDev = NULL;
m_StopShotCallBack=boost::function<void ()="">();
m_dfu_comm_send_suc=false;
m_fila_comm_send_suc=false;
}
i want to know how to fix it or if it is a bug?. cppcheck version is v2.8</void>
I can't reproduce the issue for
please show the declaration for
m_DuleeXsegmentDev
the class definition is below
class DunleeCT8000StateContext {
public:
funtion1();
funtion2();
...
funtionn();
private:
IDunleeXrayDevice* m_DuleeXsegmentDev
};
I think a small code example would be good so we can reproduce. I assume 7-8 lines of code is enough. Can you reproduce with:
Last edit: Daniel Marjamäki 2022-07-05
i reproduce with your code,it does not report this error, thanks a lot.
but i wander why cause this cause?
I assume there is a detail in your code that confuses Cppcheck. I would suggest that you reduce your code to find out why Cppcheck writes a false positive.