These messsages are complete nonsense: Argument 'NumS+2' to function atoi is always 3
Assuming that condition 'NumS==NULL' is not redundant
Argument 'NumS+2' to function atoi is always 3
The NumS is string obtained from external variable Cmb_Select->Text. And shifting 2 characters from beginning could produce completely different input.
//---------------------------------------------------------------------------void__fastcallTFPIDguard::Cmb_SelectChange(TObject*Sender){AnsiStringStr=Cmb_Select->Text;constchar*NumS=strstr(Str.c_str()," #");if(NumS==NULL)return;intPidHookId=atoi(NumS+2);if(DtpCom!=NULL&&MarshPidG!=NULL){if(!EditToFloat(Edit_wCrit,1))return;if(!EditToInt(Edit_t_Crit,1))return;intresult=DtpCom->ReadMarshalledDatapoolItem(*MarshPidG,PidGuardIndex);if(result<0){AnsiStringerrs;errs.printf(_("Cannot read data from object #%d, error %d."),PidGuardIndex,result);MessageErr(errs);return;}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
These messsages are complete nonsense:
Argument 'NumS+2' to function atoi is always 3
Assuming that condition 'NumS==NULL' is not redundant
Argument 'NumS+2' to function atoi is always 3
The NumS is string obtained from external variable Cmb_Select->Text. And shifting 2 characters from beginning could produce completely different input.
No repro with v2.3, except for
style: Variable 'PidHookId' is assigned a value that is never used. [unreadVariable]
, which is correct.Yes, you are right, the problem seems to disappear after 2 years ;).