About Cmdb lib - a command line interpreter library

2019-01-27 Since import and worked on it for two weeks, I found two issues:

  • In object constructure Cmdb::Cmdb, definition of the first variable type (RawSerial) is not compatible with OS 5.11. The variable type RawSerial is now noncopyable and compile fails on the use of copy constructor of the class member 'serial'. The fix is to change all reference to this variable type to "c++ reference", which includes constructor's definition, class member from "RawSerial serial" to "RawSerial& serial" as well.
  • When using the class with a project that link to mbed-os, instead of just 'mbed', I found a crash when issuing command 'help' with no parameter as first command right after boot. The issue is traced back to function Cmdb::parse() where variable "toks" is not initialized and, then, used as source to copy it's content to another variable under switch(typ) where typ = 's'. The fix is to zero the value of toks.


Please log in to post comments.