Examples of errors V639

Examples of errors detected by the V639 diagnostic


V639. Consider inspecting the expression for function call. It is possible that one of the closing ')' brackets was positioned incorrectly.


CryEngine 3 SDK

V639 Consider inspecting the expression for 'ShouldRecordEvent' function call. It is possible that one of the closing ')' brackets was positioned incorrectly. actortelemetry.cpp 288


bool ShouldRecordEvent(
  size_t eventID, IActor* pActor=NULL) const;

void CActorTelemetry::SubscribeToWeapon(EntityId weaponId)
{
  ....
  else if(pMgr->ShouldRecordEvent(eSE_Weapon), pOwnerRaw)
  ....
}

Eigen

V639 Consider inspecting the expression for 'isApprox' function call. It is possible that one of the closing ')' brackets was positioned incorrectly. polynomialsolver.cpp 123


template<typename Scalar> EIGEN_DEVICE_FUNC
inline bool isApprox(const Scalar& x, const Scalar& y,
  typename NumTraits<Scalar>::Real precision =
    NumTraits<Scalar>::dummy_precision())

template< .... >
void evalSolverSugarFunction(....)
{
  ....
  const Scalar psPrec = sqrt( test_precision<Scalar>() );
  ....
  if (internal::isApprox(
        calc_realRoots[i], real_roots[j] ), psPrec)
  {
    found = true;
  }
  ....
}

LibreOffice

V639 Consider inspecting the expression for 'GetPropertyValue' function call. It is possible that one of the closing ')' brackets was positioned incorrectly. pptx-epptbase.cxx 442


#define sal_True ((sal_Bool)1)

static bool GetPropertyValue(
  ::com::sun::star::uno::Any& rAny,
  const ::com::sun::star::uno::Reference<
                  ::com::sun::star::beans::XPropertySet > &,
  const OUString& rPropertyName,
  bool bTestPropertyAvailability = false );

sal_Int32 PPTWriterBase::GetLayoutOffset( .... ) const
{
  ::com::sun::star::uno::Any aAny;
  sal_Int32 nLayout = 20;
  if ( GetPropertyValue(
          aAny, rXPropSet, OUString( "Layout" ) ), sal_True )
                                               ^^^^
    aAny >>= nLayout;

  DBG(printf("GetLayoutOffset %" SAL_PRIdINT32 "\n", nLayout));
  return nLayout;
}

Similar errors can be found in some other places:

  • V639 Consider inspecting the expression for 'GetPropertyValue' function call. It is possible that one of the closing ')' brackets was positioned incorrectly. epptso.cxx 993
  • V639 Consider inspecting the expression for 'GetPropertyValue' function call. It is possible that one of the closing ')' brackets was positioned incorrectly. epptso.cxx 3677
  • V639 Consider inspecting the expression for 'GetPropertyValue' function call. It is possible that one of the closing ')' brackets was positioned incorrectly. pptx-text.cxx 518
  • And 6 additional diagnostic messages.


Do you make errors in the code?

Check your code
with PVS-Studio

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

goto PVS-Studio;