[Ovmsdev] Warning in Duktape

Michael Geddes frog at bunyip.wheelycreek.net
Sun Oct 23 21:38:58 HKT 2022


There's an unused variable 'dcc' warning in the below code.

It seems that the 'Perform the callback' is not being 'performed!

Is this deliberate?


//.ichael



void DukOvmsCommandRegisterRun(int verbosity, OvmsWriter* writer,
OvmsCommand* cmd, int argc, const char* const* argv)
  {
  ESP_LOGD(TAG, "DukOvmsCommandRegisterRun(%s)",cmd->GetName());

  auto it = MyDuktape.m_cmdmap.find(cmd);
  if (it == MyDuktape.m_cmdmap.end())
    {
    ESP_LOGE(TAG, "Command '%s' cannot be found in registry",cmd->GetName
());
    return;
    }
  else
    {
    DuktapeConsoleCommand* dcc = it->second;
    // Perform the callback
    }
  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20221023/8157a034/attachment.htm>


More information about the OvmsDev mailing list