Examples of errors detected by the V655 diagnostic.


V655. The strings were concatenated but are not utilized. Consider inspecting the expression.


Scilab

V655 The strings were concatenated but are not utilized. Consider inspecting the 'szCurLevel + "."' expression. sci_displaytree.cpp 80


int sci_displaytree(char *fname, unsigned long fname_len)
{
  ....
  string szCurLevel = "";
  ....
  //Add node level
  if (szCurLevel != "")
  {
    szCurLevel + ".";
  }
  ....
}

K Desktop Environment

V655 The strings were concatenated but are not utilized. Consider inspecting the expression. entrydetailsdialog.cpp 225


void EntryDetails::updateButtons()
{
  ....
  foreach (....) {
    QString text = info.name;
    if (!info.distributionType.trimmed().isEmpty()) {
      text + " (" + info.distributionType.trimmed() + ")"; // <=
    }
    QAction* installAction =
      installMenu->addAction(KIcon("dialog-ok"), text);
    installAction->setData(info.id);
  }
  ....
}

Similar errors can be found in some other places:

  • V655 The strings were concatenated but are not utilized. Consider inspecting the expression. itemsgridviewdelegate.cpp 365
  • V655 The strings were concatenated but are not utilized. Consider inspecting the expression. itemsviewdelegate.cpp 159

FreeCAD

V655 The strings were concatenated but are not utilized. Consider inspecting the expression. propertyitem.cpp 1013


void
PropertyVectorDistanceItem::setValue(const QVariant& variant)
{
  if (!variant.canConvert<Base::Vector3d>())
      return;
  const Base::Vector3d& value = variant.value<Base::Vector3d>();

  Base::Quantity q = Base::Quantity(value.x, Base::Unit::Length);
  QString unit = QString::fromLatin1("('%1 %2'").arg(....;
  q = Base::Quantity(value.y, Base::Unit::Length);
  unit + QString::fromLatin1("'%1 %2'").arg(....;   // <=

  setPropertyValue(unit);
}

OpenToonz

V655 The strings were concatenated, but are not utilized. Consider inspecting the 'alias + "]"' expression. plasticdeformerfx.cpp 150


string PlasticDeformerFx::getAlias(....) const
{
  std::string alias(getFxType());
  alias += "[";
  ....
  if (sd)
    alias += ", "+toString(sd, meshColumnObj->paramsTime(frame));

  alias + "]"; // <=

  return alias;
}


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
We use cookies for the analysis of events to improve our content and make user interaction more convenient. By continuing the view of our web-pages you accept the terms of using these files. You can find out more about cookie-files and privacy policy or close the notification, by clicking on the button. Learn More →
Do not show