Examples of errors detected by the V519 diagnostic.


V519. The 'x' variable is assigned values twice successively. Perhaps this is a mistake.


Crystal Space 3D SDK

V519 The 'sampleDistanceReal' object is assigned values twice successively. Perhaps this is a mistake. plgsimpleformer simpleformer.cpp 642


csVector3 sampleDistanceReal;

void csSimpleSampler::CachePositions ()
{
  ...
  // Compute distance between sample points
  sampleDistanceReal = (resx == 1) ? 0 :
    (maxCorner.x-minCorner.x)/(float)(resx-1);
  sampleDistanceReal = (resz == 1) ? 0 :
    (maxCorner.z-minCorner.z)/(float)(resz-1);
  ...
}

Most likely this is what should be written here: sampleDistanceReal.x = ...; sampleDistanceReal.z = ...;


Ultimate TCP/IP

V519 The 'prev' object is assigned values twice successively. Perhaps this is a mistake. UTHistory uh_ctrl.cpp 787


int CUH_Control::SetHistoryLength(int len){
  ...
  prev = m_HLEndPosPtr->m_prev;
  prev = m_HLEndPosPtr->m_next = NULL;
  ...
}

XUIFramework

V519 The 'm_xSt' object is assigned values twice successively. Perhaps this is a mistake. Borne resizedlg.cpp 244


CResizeDlg::CResizeDlg(....)
  : CDialog(resID,pParent)
{
  m_xSt = CST_RESIZE;
  m_xSt = CST_RESIZE;
  m_xMin = 32;
  m_yMin = 32;
  m_nDelaySide = 0;
}

eMule Plus

V519 The 'm_clrSample' object is assigned values twice successively. Perhaps this is a mistake. emule fontpreviewcombo.cpp 61


CFontPreviewCombo::CFontPreviewCombo()
{
  ...
  m_clrSample = GetSysColor(COLOR_WINDOWTEXT);
  m_clrSample = RGB(60,0,0);
  ...
}

Lugaru

V519 The 'radius' object is assigned values twice successively. Perhaps this is a mistake. Lugaru gamedraw.cpp 1505


int Game::DrawGLScene(void)
{
  ...
  radius=fast_sqrt(maxdistance);
  radius=110;
  ...
}

Wolfenstein 3D

V519 The 'r_shadows' object is assigned values twice successively. Perhaps this is a mistake. renderer tr_init.c 1135


void R_Register( void ) {
  ...
  r_shadows = ri.Cvar_Get( "cg_shadows", "1", 0 );
  r_shadows = ri.Cvar_Get( "cg_shadows", "1", 0 );
  ...
}

IPP Samples

V519 The 'MaxBrefPOC' object is assigned values twice successively. Perhaps this is a mistake. h264_enc umc_h264_enc_cpb_tmpl.cpp.h 784


H264EncoderFrameType*
H264ENC_MAKE_NAME(H264EncoderFrameList_findOldestToEncode)(....)
{
  ...
  MaxBrefPOC =
   H264ENC_MAKE_NAME(H264EncoderFrame_PicOrderCnt)(pCurr, 0, 3);
  MaxBrefPOC =
   H264ENC_MAKE_NAME(H264EncoderFrame_PicOrderCnt)(pCurr, 0, 3);
  ...
}

IPP Samples

V519 The 'k' object is assigned values twice successively. Perhaps this is a mistake. aac_enc sbr_enc_resampler_fp.c 90


AACStatus sbrencResampler_v2_32f(Ipp32f* pSrc, Ipp32f* pDst)
{
  ...
  k = nCoef-1;
  k = nCoef;
  ...
}

IPP Samples

V519 The '* tmpPtr' object is assigned values twice successively. Perhaps this is a mistake. aac_dec als_dec_api.c 928


AACStatus alsdecGetFrame(....)
{
  ...
  for (i = 0; i < num; i++) {
    ...
    *tmpPtr = (Ipp32s)((tmp << 24) + ((tmp & 0xff00) << 8) +
                      ((tmp >> 8) & 0xff00) + (tmp >> 24));
    *tmpPtr = *srcPrt;
    ...
  }
  ...
}

IPP Samples

V519 The 'saveXMask' object is assigned values twice successively. Perhaps this is a mistake. ipl iplremap.c 36

V519 The 'saveYMask' object is assigned values twice successively. Perhaps this is a mistake. ipl iplremap.c 38


static
IPLStatus ownRemap8u_Pixel(....) {
  ...
  saveXMask    = xMap->maskROI;

  saveYMask    = yMap->maskROI;
  saveYMask    = NULL;
  ...
}

Similar errors can be found in some other places:

  • V519 The 'saveXMask' object is assigned values twice successively. Perhaps this is a mistake. ipl iplremap.c 123
  • V519 The 'saveYMask' object is assigned values twice successively. Perhaps this is a mistake. ipl iplremap.c 125
  • V519 The 'saveXMask' object is assigned values twice successively. Perhaps this is a mistake. ipl iplremap.c 206
  • And 3 additional diagnostic messages.

IPP Samples

V519 The 'mNumOfFrames' object is assigned values twice successively. Perhaps this is a mistake. mpeg4_enc mp4_enc_misc.cpp 276


Ipp32s ippVideoEncoderMPEG4::Init(mp4_Param *par)
{
  ...
  mNumOfFrames = par->NumOfFrames;
  mNumOfFrames = -1;
  ...
}

IT++

V519 The 'flag' object is assigned values twice successively. Perhaps this is a mistake. itpp_mkl vq.cpp 170


ifstream &operator>>(ifstream &ifs, vec &v)
{
  ...
  flag = true;
  flag = false;
  ...
}

Strange code. The 'flag' variable is not used further at all.


Newton Game Dynamics

V519 The 'damp' object is assigned values twice successively. Perhaps this is a mistake. physics dgbody.cpp 404


void dgBody::AddBuoyancyForce (....)
{
  ...
  damp = (m_omega % m_omega) * dgFloat32 (10.0f) *
         fluidAngularViscousity;
  damp = GetMax (GetMin ((m_omega % m_omega) *
                         dgFloat32 (1000.0f) *
                         fluidAngularViscousity,
                         dgFloat32(0.25f)),
                 dgFloat32(2.0f));
  ...
}

Qt

V519 The 'tos' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 811, 819. bootstrap qxmlstream.cpp 819


void QXmlStreamReaderPrivate::init()
{
  tos = 0;                   // <=
  scanDtd = false;
  token = -1;
  token_char = 0;
  isEmptyElement = false;
  isWhitespace = true;
  isCDATA = false;
  standalone = false;
  tos = 0;                   // <=
  ...
}

Qt

V519 The 'ret' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3765, 3767. QtGui qcleanlooksstyle.cpp 3767


int QCleanlooksStyle::pixelMetric(....)
{
  ... //cases

  case PM_SpinBoxFrameWidth:
    ret = 3;
    break;
  case PM_MenuBarItemSpacing:
    ret = 6;
  case PM_MenuBarHMargin:
    ret = 0;
    break;

  ... //cases
}

The break operator is missing.


Qt

V519 The 'x1' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2218, 2219. Qt3Support q3canvas.cpp 2219


bool qt_testCollision(const Q3CanvasSprite* s1,
                      const Q3CanvasSprite* s2)
{
  ...
  t=x1; x1=x2; x2=t;
  t=y1; x1=y2; y2=t;
  ...
}

This is what should have been written here: t=y1; y1=y2; y2=t;


Qt

V519 The 'selectable' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 646, 652. Qt3Support q3listview.cpp 652


void Q3ListViewItem::init()
{
  ...
  selectable = true;        // <=
  lsc = Unsorted;
  lso = true;
  configured = false;
  expandable = false;
  selectable = true;        // <=
  ...
}

Qt

V519 The 'retVal' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 169, 171. QtWebKit inspectorclientqt.cpp 171


static String variantToSetting(const QVariant& qvariant)
{
    String retVal;

    switch (qvariant.type()) {
    case QVariant::Bool:
        retVal = qvariant.toBool() ? "true" : "false";
    case QVariant::String:
        retVal = qvariant.toString();
    default:
        break;
    }

    return retVal;
}

The break operator is missing.


Qt

V519 The 'shortVersion' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1791, 1795. qdoc3 htmlgenerator.cpp 1795


void HtmlGenerator::generateHeader(....)
{
  ...
  QString shortVersion;
  shortVersion = project + " " + shortVersion + ": ";
  if (node && !node->doc().location().isEmpty())
      out() << "<!-- " << node->doc().location().fileName() <<
      " -->\n";

  shortVersion = myTree->version();
  ...
}

Most likely this is what should be written here: shortVersion += myTree->version();


MySQL

V519 The 'stats.max_data_file_length' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1597, 1598. archive ha_archive.cc 1598


int ha_archive::info(uint flag)
{
  ...
  stats.max_data_file_length= share->rows_recorded *
                              stats.mean_rec_length;
  stats.max_data_file_length= MAX_FILE_SIZE;
  ...
}

CMake

V519 The 'p [1]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 272, 273. cmlibarchive archive_write_set_format_pax.c 273


static char *
utf8_encode(const wchar_t *wval)
{
  ...
  p[0] = 0xfc | ((wc >> 30) & 0x01);
  p[1] = 0x80 | ((wc >> 24) & 0x3f); // <=
  p[1] = 0x80 | ((wc >> 18) & 0x3f); // <=
  p[2] = 0x80 | ((wc >> 12) & 0x3f);

Fireflies

V519 The 'm_pDialog' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3470, 3481. DXUTOpt dxutgui.cpp 3481


CDXUTControl::CDXUTControl( CDXUTDialog* pDialog )
{
  ...
  m_pDialog = pDialog;
  ...
  m_pDialog = NULL;
  ...
}

Intel AMT SDK

V519 The '* state' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1049, 1050. StorageHelper storagehelper.c 1050


PT_STATUS OpenPTSession(....)
{
  ...
  *state = PT_REGISTERED;
  *state = PT_OPENED;
  ...
}

Clang

V519 The 'SignedOverflowBehavior' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 207, 213. FrontendTests langoptions.h 213


LangOptions() {
  ...
  SignedOverflowBehavior = SOB_Undefined;

  AssumeSaneOperatorNew = 1;
  AccessControl = 1;
  ElideConstructors = 1;

  SignedOverflowBehavior = 0;
  ...
}

Clang

V519 The 'Src1Name' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 211, 215. LLVMX86AsmPrinter x86instcomments.cpp 215


void llvm::EmitAnyX86InstComments(....) {
  ...
  case X86::VPERMILPSri:
    DecodeVPERMILPSMask(4, MI->getOperand(2).getImm(),
                        ShuffleMask);
    Src1Name = getRegName(MI->getOperand(0).getReg());
  case X86::VPERMILPSYri:
    DecodeVPERMILPSMask(8, MI->getOperand(2).getImm(),
                        ShuffleMask);
    Src1Name = getRegName(MI->getOperand(0).getReg());
    break;
  ...
}

The break operator is missing.


Clang

V519 The 'ParmOffset' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3953, 3956. clangAST astcontext.cpp 3956


std::string ASTContext::getObjCEncodingForBlock(....) const {
  ...
  ParmOffset = PtrSize;
  // Argument types.
  ParmOffset = PtrSize;
  ...
}

ReactOS

V519 The 'bih.bV5AlphaMask' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 357, 358. windowscodecs bmpencode.c 358


static HRESULT WINAPI BmpFrameEncode_Commit(....)
{
  ...
  bih.bV5RedMask = This->format->redmask;
  bih.bV5GreenMask = This->format->greenmask;
  bih.bV5BlueMask = This->format->bluemask;
  bih.bV5AlphaMask = This->format->alphamask;  // <=
  bih.bV5AlphaMask = LCS_DEVICE_RGB;           // <=
  ...
}

Most likely this is what should be written here: bih.bV5CSType = LCS_DEVICE_RGB;


ReactOS

V519 The 'v2' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 343, 343. win32k gradient.c 343


#define SWAP(a,b,c)  c = a;\
                     a = b;\
                     a = c

BOOL FASTCALL
IntEngGradientFillTriangle(....)
{
  ...
  SWAP(v2,v3,t);
  ...
}

Masterpiece! This is what should have been written here: c = a; a = b; b = c;


ReactOS

V519 The 'CenterCount' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4125, 4126. win32k dib32gen.c 4126


static void
DIB_32BPP_BitBlt_SRCCOPY(PBLTINFO BltInfo)
{
  ...
  CenterCount = BltInfo->DestRect.right -
                BltInfo->DestRect.left;
  CenterCount = 4 * (BltInfo->DestRect.right -
                      BltInfo->DestRect.left);
  ...
}

Similar errors can be found in some other places:

  • V519 The 'CenterCount' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4102, 4103. win32k dib32gen.c 4103

ReactOS

V519 The 'DriverObject->MajorFunction [0x0f]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1058, 1059. scsiport scsiport.c 1059


#define IRP_MJ_INTERNAL_DEVICE_CONTROL    0x0f
#define IRP_MJ_SCSI                       0x0f

ULONG NTAPI
ScsiPortInitialize(....)
{
  ...
  DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] =
    ScsiPortDeviceControl;
  DriverObject->MajorFunction[IRP_MJ_SCSI] =
    ScsiPortDispatchScsi;
  ...
}

ReactOS

V519 The 'pmsnName->SectionFileName.Length' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 294, 295. psapi psapi.c 295


static DWORD
InternalGetMappedFileName(....)
{
  ...
  pmsnName->SectionFileName.Length = 0;
  pmsnName->SectionFileName.Length = nBufSize;
   ...
}

ReactOS

V519 The 'ObjectName' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1129, 1130. ntoskrnl obname.c 1130


typedef WCHAR *PWCH;

NTSTATUS
ObQueryNameString(....)
{
  PWCH ObjectName;
  ...
  /* Directory without a name, we add "..." */
  ObjectName -= sizeof(L"...");
  ObjectName = L"...";
  break;
  ...
}

ReactOS

V519 The 'cols [1]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 716, 719. cardlib cardwindow.cpp 719


NTSTATUS
CreateCdRomDeviceObject(....)
{
  ...
  cddata->XAFlags &= ~XA_USE_6_BYTE;
  cddata->XAFlags = XA_USE_READ_CD | XA_USE_10_BYTE;
  ...
}

ReactOS

V519 The 'cols [1]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 716, 719. cardlib cardwindow.cpp 719


HPALETTE CardWindow::CreateCardPalette()
{
  ...
  //include button text colours
  cols[0] = RGB(0, 0, 0);
  cols[1] = RGB(255, 255, 255);

  //include the base background colour
  cols[1] = crBackgnd;

  //include the standard button colours...
  cols[3] = CardButton::GetHighlight(crBackgnd);
  cols[4] = CardButton::GetShadow(crBackgnd);
  cols[5] = CardButton::GetFace(crBackgnd);
  ...
}

Most likely this is what should be written here: cols[2] = crBackgnd;


IPP Samples

V519 The 'aInfo.allTime' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 336, 338. 3d-viewer 3dvmain.cpp 338


static DWORD WINAPI Decoder(void *p)
{
  ...
  aInfo.statIntercekt.statIntersectEye = 0.;
  aInfo.statIntercekt.statCPPPostPrc = 0.;
  aInfo.statIntercekt.statInner = 0.;
  aInfo.statIntercekt.statCPR = 0.;
  aInfo.allTime = 0.f;
  statCount = MAX_STAT_COUNT;
  aInfo.allTime = 0.;
  ...
}

Most likely this is what should be written here: aInfo.kdtTime = 0.;


IPP Samples

V519 The 'core_enc->m_pCurrentFrame->m_FrameNum' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1804, 1805. h264_enc umc_h264_video_encoder_tmpl.cpp.h 1805


Status H264ENC_MAKE_NAME(H264CoreEncoder_UpdateRefPicMarking)(
    void* state)
{
  ...
  // set frame_num to zero for this picture, for correct
  // FrameNumWrap
  core_enc->m_pCurrentFrame->m_FrameNum = 0;
  core_enc->m_pCurrentFrame->m_FrameNum = 0;
  ...
}

Yasm

V519 The 'load' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1346, 1350. yasm coff-objfmt.c 1350


static int
coff_helper_gasflags(....)
{
  ...
  case 'd':
      datasect = 1;
      load = 1;
      readonly = 0;
  case 'x':
      code = 1;
      load = 1;
      break;
  ...
}

The break operator is missing.


OGRE

V519 The 'tu' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 370, 372. OgreTerrain ogreterrainmaterialgeneratora.cpp 372


void TerrainMaterialGeneratorA::SM2Profile::addTechnique(....)
{
  ...
  TextureUnitState* tu;
  ...
  for (uint i = 0; i < numLayers; ++i)
  {
    // diffuse / specular
    tu = pass->createTextureUnitState(
                 terrain->getLayerTextureName(i, 0));
    // normal / height
    tu = pass->createTextureUnitState(
                 terrain->getLayerTextureName(i, 1));
  }
  ...
}

Doom 3

V519 The 'eof' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 216, 221. Game script_compiler.cpp 221


idCompiler::idCompiler() {
  ...
  eof = true;
  ...
  eof = false;
  ...
}

Mozilla Firefox

V519 The '* vp' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 711, 712. jsdbgapi.cpp 712


JS_PUBLIC_API(JSBool)
JS_GetValidFrameCalleeObject(JSContext *cx, JSStackFrame *fp,
                             jsval *vp)
{
    Value v;

    if (!Valueify(fp)->getValidCalleeObject(cx, &v))
        return false;
    *vp = v.isObject() ? v : JSVAL_VOID;
    *vp = v;
    return true;
}

Mozilla Firefox

V519 The 'event.refPoint.x' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 545, 546. puppetwidget.cpp 546


nsresult
PuppetWidget::DispatchPaintEvent()
{
  ...
  event.refPoint.x = dirtyRect.x;
  event.refPoint.x = dirtyRect.y;
  ...
}

Quake-III-Arena

V519 The 'numQuadCels' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1004, 1006. quake3 cl_cin.c 1006


static void setupQuad( long xOff, long yOff )
{
    ...
  numQuadCels  = (.....);
  numQuadCels += numQuadCels/4 + numQuadCels/16;
  numQuadCels += 64;
  numQuadCels  = (.....);
  numQuadCels += numQuadCels/4;
  numQuadCels += 64;
  ...
}

wxWidgets

V519 The 'm_isDirty' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 249, 250. core dragimgg.cpp 250


bool m_isDirty;
bool m_isShown;

bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
                                   wxWindow* window,
                                   bool fullScreen,
                                   wxRect* rect)
{
  ...
  m_isDirty = false;
  m_isDirty = false;
  ...
}

Most likely this is what should be written here: m_isShown = false;


wxWidgets

V519 The 'rasDialParams.szCallbackNumber[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 832, 833. core dialup.cpp 833


WCHAR szEntryName[ RAS_MaxEntryName + 1 ];
WCHAR szPhoneNumber[ RAS_MaxPhoneNumber + 1 ];
WCHAR szCallbackNumber[ RAS_MaxCallbackNumber + 1 ];

bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
                              const wxString& username,
                              const wxString& password,
                              bool async)
{
  ...
  // default values for other fields
  rasDialParams.szPhoneNumber[0] = '\0';
  rasDialParams.szCallbackNumber[0] = '\0';
  rasDialParams.szCallbackNumber[0] = '\0';
  ...
}

Most likely this is what should be written here: rasDialParams.szEntryName[0] = '\0';


WinMerge

V519 The 'code' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 79, 80. Merge timesizecompare.cpp 80


int TimeSizeCompare::CompareFiles(int compMethod,
                                  const DIFFITEM &di)
{
  UINT code = DIFFCODE::SAME;
  ...
  if (di.left.size != di.right.size)
  {
    code &= ~DIFFCODE::SAME;
    code = DIFFCODE::DIFF;
  }
  ...
}

WinMerge

V519 The 'strParsed' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 339, 342. Merge filefilterhelper.cpp 342


String FileFilterHelper::ParseExtensions(
  const String &extensions) const
{
  ...
  strParsed = _T("^");
  strPattern = string_makelower(strPattern);
  strParsed = strPattern;
  ...
}

Trans-Proteomic Pipeline

V519 The 'pvalue' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 205, 214. tpplib asapcgiparser.cxx 214 (....)


void ASAPCGIParser::writeProteinRatio(ostream& os,
  proDataStrct* pro_ratio, const char* name)
{
  ...
  pvalue = (double)norm_->normalize(adj_inv_ratio);  // <=

  double tmp[2];
  tmp[0] = adj_inv_ratio[0];
  tmp[1] = adj_inv_ratio[1];
  adj_inv_ratio[0] = 1/ tmp[0];
  adj_inv_ratio[1] = tmp[1]/(tmp[0]*tmp[0]);

  pvalue = (double)norm_->normalize(adjratio);       // <=
  ...
}

D programming language

V519 The 'c2' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1860, 1861. cod2.c 1861


code *cdcond(elem *e,regm_t *pretregs)
{
  code *cc,*c,*c1,*cnop1,*c2,*cnop2;
  ....
  c2 = codelem(e22,&retregs,FALSE);
  c2 = cat(c1, fixresult(e22,retregs,pretregs));
  ....
}

Most likely this is what should be written here: c2 = cat(c2, ....);


OpenCV

V519 The 'ccp->sampgrdsubstepx' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 414, 415. jpc_enc.c 415


static jpc_enc_cp_t *cp_create(char *optstr, jas_image_t *image)
{
  ....
  ccp->sampgrdsubstepx = 0;
  ccp->sampgrdsubstepx = 0;
  ....
}

OpenCV

V519 The 'pass->lyrno' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 539, 540. jpc_t2enc.c 540


void jpc_init_t2state(jpc_enc_t *enc, int raflag)
{
  ....
  for (pass = cblk->passes; pass != endpasses; ++pass) {
    pass->lyrno = -1;
    pass->lyrno = 0;
  }
  ....
}

ReactOS

V519 The 'cddata->XAFlags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1290, 1291. cdrom.c 1291


NTSTATUS NTAPI
CreateCdRomDeviceObject(....)
{
  ....
  cddata->XAFlags &= ~XA_USE_6_BYTE;
  cddata->XAFlags = XA_USE_READ_CD | XA_USE_10_BYTE;
  ....
}

Windows 8 Driver Samples

V519 The 'Action' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1110, 1124. cpsuidat.c 1124


CPSUICALLBACK TVTestCallBack(....)
{
  ....
  switch (DMPubID)
  {
    ....
    case DMPUB_TVOPT_OVERLAY_NO:
      Action = CPSUICB_ACTION_REINIT_ITEMS;
    case DMPUB_TVOPT_ECB_EP:
      ....
      Action = CPSUICB_ACTION_OPTIF_CHANGED;
      //
      // Fall through
      //
    ....
  }
  ....
}

The break operator is missing.


WebRTC

V519 The 'dtmp2' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1578, 1608. aec_core.c 1608


static void UpdateMetrics(AecCore* aec)
{
  float dtmp, dtmp2;
  ....
  dtmp2 = 10 * (float)log10(aec->farlevel.averagelevel /
                            echo + 1e-10f);
  ....
  dtmp2 = 10 * (float)log10(echo / suppressedEcho + 1e-10f);
  ....
}

WebRTC

V519 The 'dtmp' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1636, 1640. aec_core.c 1640


static void UpdateMetrics(AecCore* aec)
{
  ....
  dtmp = 10 * (float)log10(aec->nearlevel.averagelevel /
      (2 * aec->nlpoutlevel.averagelevel) + 1e-10f);
  dtmp2 = 10 * (float)log10(echo / suppressedEcho + 1e-10f);

  dtmp = dtmp2;
  ....
}

ICU

V519 The 'fRB->fParseError->preContext[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 582, 583. rbbiscan.cpp 583


void RBBIRuleScanner::error(UErrorCode e) {
  if (U_SUCCESS(*fRB->fStatus))
  {
    *fRB->fStatus = e;
    if (fRB->fParseError)
    {
      fRB->fParseError->line  = fLineNum;
      fRB->fParseError->offset = fCharNum;
      fRB->fParseError->preContext[0] = 0;
      fRB->fParseError->preContext[0] = 0;
    }
  }
}

Most likely this is what should be written here: fRB->fParseError->preContext[0] = 0; fRB->fParseError->postContext[0] = 0;


Multi Theft Auto

V519 The 'm_ucRed' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 47, 47. cchatechopacket.h 47


class CChatEchoPacket : public CPacket
{
  ....
  inline void SetColor( unsigned char ucRed,
                        unsigned char ucGreen,
                        unsigned char ucBlue )
  { m_ucRed = ucRed; m_ucGreen = ucGreen; m_ucRed = ucRed; };
  ....
}

Most likely this is what should be written here: { m_ucRed = ucRed; m_ucGreen = ucGreen; m_ucBlue = ucBlue; };

Similar errors can be found in some other places:

  • V519 The 'm_ucRed' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 45, 45. cdebugechopacket.h 45

Multi Theft Auto

V519 The 'strReason' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 558, 561. cpackethandler.cpp 561


void CPacketHandler::Packet_ServerDisconnected (....)
{
  ....
  case ePlayerDisconnectType::BANNED_IP:
    strReason = _("Disconnected: You are banned.\nReason: %s");
    strErrorCode = _E("CD33");
    bitStream.ReadString ( strDuration );
  case ePlayerDisconnectType::BANNED_ACCOUNT:
    strReason =
     _("Disconnected: Account is banned.\nReason: %s");
    strErrorCode = _E("CD34");
    break;
  ....
}

Trans-Proteomic Pipeline

V519 The 'data->ratio[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 130, 131. asapcgidisplay2main.cxx 131


void ASAPRatio_getProDataStrct(proDataStrct *data,
                               char **pepBofFiles)
{
  ....
  if (data->indx == -1) {
    data->ratio[0] = -2.;
    data->ratio[0] = 0.;
    data->inv_ratio[0] = -2.;
    data->inv_ratio[1] = 0.;
    return;
  }
  ....
}

Most likely this is what should be written here: data->ratio[0] = -2.; data->ratio[1] = 0.;

Similar errors can be found in some other places:

  • V519 The 'data->ratio[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 337, 338. asapcgidisplay2main.cxx 338
  • V519 The 'data->ratio[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 464, 465. asapcgidisplay2main.cxx 465
  • V519 The 'data->ratio[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 392, 393. asapratioproteincgidisplayparser.cxx 393
  • And 1 additional diagnostic messages.

OpenCOLLADA

V519 The 'values[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 317, 318. mayadmtypes.h 318


struct double2
{
  double values[2];
  double2( double d1, double d2)
  {
    values[0]=d1;
    values[0]=d2;
  }
  ....
}

QuantLib

V519 The 'engine' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 98, 103. extendedtrees.cpp 103


boost::shared_ptr<VanillaOption> makeOption(....)
{
  switch (engineType) {
  case CRR:
    engine = boost::shared_ptr<PricingEngine>(
      new BinomialVanillaEngine<ExtendedCoxRossRubinstein>(..));
  case EQP:
    engine = boost::shared_ptr<PricingEngine>(
      new BinomialVanillaEngine<
        ExtendedAdditiveEQPBinomialTree>(..));
    break;
  ....
}

The break operator is missing.

Similar errors can be found in some other places:

  • V519 The 'engine' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 126, 130. europeanoption.cpp 130

Redis

V519 The 'result' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 253, 255. win32fixes.c 255


int win32_pthread_join(pthread_t *thread, void **value_ptr)  {
    int result;
    HANDLE h = OpenThread(SYNCHRONIZE, FALSE, *thread);
    REDIS_NOTUSED(value_ptr);

    switch (WaitForSingleObject(h, INFINITE)) {
            case WAIT_OBJECT_0:
                    result = 0;
            case WAIT_ABANDONED:
                    result = EINVAL;
            default:
                    result = GetLastError();
    }

    CloseHandle(h);
    return result;
}

VirtualDub

V519 The 'mbAudioHardwarePresent' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 274, 275. VDCapture cap_screen.cpp 275


bool VDCaptureDriverScreen::Init(VDGUIHandle hParent) {
  ....
  mbAudioHardwarePresent = false;
  mbAudioHardwarePresent = true;
  ....
}

Geant4 software

V519 The 'the4Momentum' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 451, 452. g4kinetictrack.cc 452


const G4KineticTrack& G4KineticTrack::operator=(
  const G4KineticTrack& right)
{
  ....
  the4Momentum = right.the4Momentum;
  the4Momentum = right.GetTrackingMomentum();
  ....
}

Geant4 software

V519 The 'fX0density' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 245, 247. g4ionisparammat.cc 247

V519 The 'fX1density' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 245, 247. g4ionisparammat.cc 247


void G4IonisParamMat::ComputeDensityEffect()
{
  ....
  fX0density = 0.326*fCdensity-2.5 ;
  fX1density = 5.0 ;
  fMdensity = 3. ;
  while((icase > 0)&&(fCdensity < ClimiG[icase])) icase-- ;
  fX0density = X0valG[icase];
  fX1density = X1valG[icase];
  ....
}

Geant4 software

V519 The 'post_step_AdjointCS' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 76, 77. g4adjointphotoelectricmodel.cc 77


void G4AdjointPhotoElectricModel::SampleSecondaries(....)
{
  ....
  pre_step_AdjointCS = totAdjointCS;
  post_step_AdjointCS =
    AdjointCrossSection(aCouple, electronEnergy,
                        IsScatProjToProjCase);
  post_step_AdjointCS = totAdjointCS;
  ....
}

Geant4 software

V519 The 'varntp->erecrem' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 896, 897. g4incl.cc 897


void G4Incl::processEventIncl(G4InclInput *input)
{
  ....
  varntp->mzini = izrem;
  varntp->exini = esrem;
  varntp->pxrem = pxrem;
  varntp->pyrem = pyrem;
  varntp->pzrem = pzrem;
  varntp->mcorem = mcorem;
  varntp->erecrem = pcorem;
  varntp->erecrem = erecrem;
  ....
}

Most likely this is what should be written here: varntp->pcorem = pcorem;


Geant4 software

V519 The 'BaryonWeight[0][1][2][2]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 205, 208. g4lundstringfragmentation.cc 208


G4LundStringFragmentation::G4LundStringFragmentation()
{
  ....
  BaryonWeight[0][1][2][2]=pspin_barion*0.5;
  ....
  BaryonWeight[0][1][2][2]=(1.-pspin_barion);
  ....
}

Geant4 software

V519 The 'Etot' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 80, 83. _G4processes-archive g4rkfieldintegrator.cc 83


G4double G4RKFieldIntegrator::CalculateTotalEnergy(
  const G4KineticTrackVector& Barions)
{
  G4double Etot = 0;
  ....
  for(G4int c2 = c1 + 1; c2 < nBarion; c2++)
  {
    ....
    //  Esk2
    Etot += t1*std::pow(Alpha/pi, 3/2)*std::exp(-Alpha*r12*r12);

    // Eyuk
    Etot += ....;

    // Ecoul
    Etot += 1.44*p1->GetDefinition()->GetPDGCharge()*
            p2->GetDefinition()->GetPDGCharge()/r12*
            Erf(std::sqrt(Alpha)*r12);

    // Epaul
    Etot = 0;
    ....
  }
  ....
}

EA WebKit

V519 The 'v8MethodName' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 412, 414. ScriptDebugServer.cpp 414


bool ScriptDebugServer::executeSkipPauseRequest(....)
{
  const char* v8MethodName;
  switch (request)
  {
    case ScriptDebugListener::NoSkip:
      return false;
    case ScriptDebugListener::Continue:
      return true;
    case ScriptDebugListener::StepInto:
      v8MethodName = stepIntoV8MethodName;
    case ScriptDebugListener::StepOut:
      v8MethodName = stepOutV8MethodName;
  }
  v8::Handle<v8::Value> argv[] = { executionState };
  callDebuggerMethod(stepIntoV8MethodName, 1, argv);
  return true;
}

EA WebKit

V519 The 'extensionObject' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 222, 225. V8WebGLRenderingContextCustom.cpp 225

V519 The 'referenceName' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 223, 226. V8WebGLRenderingContextCustom.cpp 226


static v8::Handle<v8::Value>
toV8Object(....)
{
  switch (extension->name()) {
    ....
    case WebGLExtension::WebGLCompressedTextureATCName:
      extensionObject = toV8(....);
      referenceName = "webGLCompressedTextureATCName";
    case WebGLExtension::WebGLCompressedTexturePVRTCName:
      extensionObject = toV8(....);
      referenceName = "webGLCompressedTexturePVRTCName";
      break;
  }
  ....
}

PostgreSQL Database Management System

V519 The 'new_rel_reltup->relfrozenxid' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 912, 913. postgres heap.c 913


static void
AddNewRelationTuple(....)
{
  ....
  new_rel_reltup->relfrozenxid = InvalidTransactionId;
  new_rel_reltup->relfrozenxid = InvalidMultiXactId;
  ....
}

Most likely this is what should be written here: new_rel_reltup->relfrozenxid = InvalidTransactionId; new_rel_reltup->relminmxid= InvalidMultiXactId;


Source Engine SDK

V519 The 'm_flCurrentTorsoYaw' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 67, 68. Client (HL2) base_playeranimstate.cpp 68


CBasePlayerAnimState::CBasePlayerAnimState()
{
  ....
  m_flCurrentTorsoYaw = 0.0f;
  m_flCurrentTorsoYaw = TURN_NONE;
  ....
}

Most likely this is what should be written here: m_flCurrentTorsoYaw = 0.0f; m_nTurningInPlace = TURN_NONE;


Source Engine SDK

V519 The 'nFPSThreshold1' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 191, 192. Client (HL2) vgui_fpspanel.cpp 192


void GetFPSColor( int nFps, unsigned char ucColor[3] )
{
  ....
  int nFPSThreshold1 = 20;
  int nFPSThreshold2 = 15;

  if (IsPC() &&
      g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 95)
  {
    nFPSThreshold1 = 60;
    nFPSThreshold1 = 50;
  }
  ....
}

Source Engine SDK

V519 The 'm_flMinRestInterval' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 48, 49. Server (HL2) ai_utils.cpp 49


CAI_ShotRegulator::CAI_ShotRegulator() :
  m_nMinBurstShots(1), m_nMaxBurstShots(1)
{
  m_flMinRestInterval = 0.0f;
  m_flMinRestInterval = 0.0f;
  m_flMinBurstInterval = 0.0f;
  m_flMaxBurstInterval = 0.0f;
  m_flNextShotTime = -1;
  m_nBurstShotsRemaining = 1;
  m_bInRestInterval = false;
  m_bDisabled = false;
}

Most likely this is what should be written here: m_flMinRestInterval = 0.0f; m_flMaxRestInterval = 0.0f;


Source Engine SDK

V519 The 'm_flCustomBloomScale' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 171, 172. Server (HL2) env_tonemap_controller.cpp 172


void CEnvTonemapController::InputSetBloomScaleRange(
  inputdata_t &inputdata )
{
  ....
  m_flCustomBloomScale=bloom_max;
  m_flCustomBloomScale=bloom_min;
}

Most likely this is what should be written here: m_flCustomBloomScale=bloom_max; m_flCustomBloomScaleMinimum=bloom_min;


LibRaw

V519 The 'l' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 671, 672. dht_demosaic.cpp 672


void DHT::illustrate_dline(int i) {
  ....
    int l = ndir[nr_offset(y, x)] & 8;
    l >>= 3;
    l = 1;
  ....
}

OpenH264

V519 The 'iNumMb' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 127, 129. fmo.cpp 129


static inline int32_t FmoGenerateSliceGroup (....)
{
  ....
  int32_t iNumMb = 0;
  ....
  iNumMb = pFmo->iCountMbNum;
  iNumMb = kiMbWidth * kiMbHeight;
  ....
}

CryEngine 3 SDK

V519 The 'destructionEvents[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 75, 76. bodydestruction.h 76


TDestructionEventId destructionEvents[2];

SDestructibleBodyPart()
  : hashId(0)
  , healthRatio(0.0f)
  , minHealthToDestroyOnDeathRatio(0.0f)
{
  destructionEvents[0] = -1;
  destructionEvents[0] = -1;
}

CryEngine 3 SDK

V519 The 'objtypes' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2807, 2808. physinterface.h 2808


const SRWIParams& Init(....)
{
  ....
  objtypes=ent_all;
  flags=rwi_stop_at_pierceable;
  org=_org;
  dir=_dir;
  objtypes=_objtypes;
  ....
}

Similar errors can be found in some other places:

  • V519 The 'bExecuteCommandLine' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 628, 630. isystem.h 630
  • V519 The 'flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2807, 2808. physinterface.h 2808
  • V519 The 'entTypes' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2854, 2856. physinterface.h 2856
  • And 2 additional diagnostic messages.

CryEngine 3 SDK

V519 The 'maxChargedThrowSpeed' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1284, 1285. weaponsharedparams.cpp 1285


void SPickAndThrowParams::SThrowParams::SetDefaultValues()
{
  ....
  maxChargedThrowSpeed = 20.0f;
  maxChargedThrowSpeed = 15.0f;
}

Wild Magic 5

V519 The 'sstate->OnZFail' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 444, 445. wm5visualeffect.cpp 445


class WM5_GRAPHICS_ITEM StencilState : public Object
{
  ....
  OperationType OnFail;
  OperationType OnZFail;
  OperationType OnZPass;
};

StencilState* VisualEffect::LoadStencilState (FileIO& inFile)
{
  ....
  sstate->OnFail = (StencilState::OperationType)onFail;
  sstate->OnZFail = (StencilState::OperationType)onZFail;
  sstate->OnZFail = (StencilState::OperationType)onZPass;
  ....
}

V8 JavaScript Engine

V519 The 'fRB->fParseError->preContext[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 582, 583. rbbiscan.cpp 583


void RBBIRuleScanner::error(UErrorCode e) {
  if (U_SUCCESS(*fRB->fStatus)) {
    *fRB->fStatus = e;
    if (fRB->fParseError) {
      fRB->fParseError->line  = fLineNum;
      fRB->fParseError->offset = fCharNum;
      fRB->fParseError->preContext[0] = 0;
      fRB->fParseError->preContext[0] = 0;
    }
  }
}

Data Distribution Service

V519 The 'actual_mcast_addr' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 89, 92. inforepomulticastresponder.cpp 92


int
InfoRepoMulticastResponder::init(
  CORBA::ORB_ptr orb,
  const char *mcast_addr)
{
  ....
  } else {
    actual_mcast_addr =
      CORBA::string_alloc(static_cast<CORBA::ULong>(
        ACE_OS::strlen(mcast_addr)));

    actual_mcast_addr = mcast_addr;
  }
  ....
}

Scilab

V519 The 'ix1' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2387, 2389. stack1.c 2389


int C2F(pmatj) (char *fname, int *lw, int *j,
                unsigned long fname_len)
{
  ....
  ix1 = il2 + 4;
  m2 = Max(m, 1);
  ix1 = il + 9 + m * n;
  ....
}

Unreal Engine 4

V519 The 'NotUsed6' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 86, 88. memorybase.h 88


struct FMemoryAllocationStats_DEPRECATED
{
  ....
  SIZE_T  NotUsed5;
  SIZE_T  NotUsed6;
  SIZE_T  NotUsed7;
  SIZE_T  NotUsed8;
  ....
};

FMemoryAllocationStats_DEPRECATED()
{
  ....
  NotUsed5 = 0;
  NotUsed6 = 0;
  NotUsed6 = 0;
  NotUsed8 = 0;
  ....
}

Similar errors can be found in some other places:

  • V519 The 'HighlightText' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 204, 206. srichtextblock.cpp 206
  • V519 The 'TrackError.MaxErrorInScaleDueToScale' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1715, 1716. animationutils.cpp 1716

Unreal Engine 4

V519 The 'BaseTypeName' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 862, 863. openglshaders.cpp 863


static void VerifyUniformLayout(....)
{
  ....
  switch(Member.GetBaseType())
  {
    case UBMT_STRUCT:  BaseTypeName = TEXT("struct");
    case UBMT_BOOL:    BaseTypeName = TEXT("bool"); break;
    case UBMT_INT32:   BaseTypeName = TEXT("int"); break;
    case UBMT_UINT32:  BaseTypeName = TEXT("uint"); break;
    case UBMT_FLOAT32: BaseTypeName = TEXT("float"); break;
    default:
      UE_LOG(LogShaders, Fatal,
        TEXT("Unrecognized uniform buffer "
             "struct member base type."));
  };
  ....
}

This is what should have been written here: case UBMT_STRUCT: BaseTypeName = TEXT("struct"); break;


WinSCP

V519 The 'm_pMainThread->m_hOwnerWnd' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 88, 89. filezillaapi.cpp 89


int CFileZillaApi::Init(....)
{
  ....
  m_pMainThread->m_hOwnerWnd=m_hOwnerWnd;
  m_pMainThread->m_hOwnerWnd=m_hOwnerWnd;
  ....
}

Qt

V519 The 'pattern->patternRepeatY' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1775, 1776. qquickcontext2d.cpp 1776


QV4::ReturnedValue
QQuickJSContext2DPrototype::method_createPattern(....)
{
  ....
  if (repetition == QStringLiteral("repeat") ||
      repetition.isEmpty()) {
    pattern->patternRepeatX = true;
    pattern->patternRepeatY = true;
  } else if (repetition == QStringLiteral("repeat-x")) {
    pattern->patternRepeatX = true;
  } else if (repetition == QStringLiteral("repeat-y")) {
    pattern->patternRepeatY = true;
  } else if (repetition == QStringLiteral("no-repeat")) {
    pattern->patternRepeatY = false;
    pattern->patternRepeatY = false;
  } else {
    //TODO: exception: SYNTAX_ERR
  }
  ....
}

Qt

V519 The 'firstchar' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 7018, 7019. pcre_compile.c 7019


static BOOL
compile_branch(....)
{
  ....
  pcre_uint32 firstchar;
  ....
  firstchar = mcbuffer[0] | req_caseopt;
  firstchar = mcbuffer[0];
  ....
}

Similar errors can be found in some other places:

  • V519 The 'exitCode' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 807, 815. qprocess.cpp 815
  • V519 The 'detecting' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 163, 164. qhoversensorgesturerecognizer.cpp 164
  • V519 The 'increaseCount' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 185, 186. qtwistsensorgesturerecognizer.cpp 186

Qt

V519 The 'consumed' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 110, 115. googlesuggest.cpp 115


bool GSuggestCompletion::eventFilter(QObject *obj, QEvent *ev)
{
  ....
  switch (key) {
  case Qt::Key_Enter:
  case Qt::Key_Return:
    doneCompletion();
    consumed = true;

  case Qt::Key_Escape:
    editor->setFocus();
    popup->hide();
    consumed = true;

  case Qt::Key_Up:
  case Qt::Key_Down:
  case Qt::Key_Home:
  case Qt::Key_End:
  case Qt::Key_PageUp:
  case Qt::Key_PageDown:
    break;
  ....
}

Qt

V519 The 'index' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 568, 570. moc.cpp 570


void Moc::parse()
{
  ....
  index = def.begin + 1;
  namespaceList += def;
  index = rewind;
  ....
}

OpenSSL

V519 The 'ret' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 376, 377. s3_srvr.c 377


#define SSL_TLSEXT_ERR_ALERT_FATAL 2

int ssl3_accept(SSL *s)
{
  ....
  if (ret != SSL_ERROR_NONE)
  {
    ssl3_send_alert(s,SSL3_AL_FATAL,al);
    if (al != TLS1_AD_UNKNOWN_PSK_IDENTITY)
      SSLerr(SSL_F_SSL3_ACCEPT,SSL_R_CLIENTHELLO_TLSEXT);
    ret = SSL_TLSEXT_ERR_ALERT_FATAL;
    ret= -1;
    goto end;
  }
  ....
}

OpenSSL

V519 The 'saved_state.epoch' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1277, 1278. d1_both.c 1278


int
dtls1_retransmit_message(....)
{
  ....
  /* save current state */
  saved_state.enc_write_ctx = s->enc_write_ctx;
  saved_state.write_hash = s->write_hash;
  saved_state.compress = s->compress;
  saved_state.session = s->session;
  saved_state.epoch = s->d1->w_epoch;
  saved_state.epoch = s->d1->w_epoch;
  ....
}

Tesseract

V519 The 'edgept' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 76, 78. libtesseract303 polyaprx.cpp 78


TESSLINE* ApproximateOutline(....) {
  EDGEPT *edgept;
  ....
  edgept = edgesteps_to_edgepts(c_outline, edgepts);
  fix2(edgepts, area);
  edgept = poly2 (edgepts, area);  // 2nd approximation.
  ....
}

Tesseract

V519 The 'this_valid' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 396, 397. libtesseract303 wordseg.cpp 397


inT32 row_words2(....)
{
  ....
  this_valid = blob_box.width () >= min_width;
  this_valid = TRUE;
  ....
}

OpenMW

V519 The 'conv[0xe1]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 103, 104. openmw fontloader.cpp 104


std::string getUtf8 (unsigned char c,
  ToUTF8::Utf8Encoder& encoder, ToUTF8::FromType encoding)
{
  ....
  conv[0xa2] = 0xf3;
  conv[0xa3] = 0xbf;
  conv[0xa4] = 0x0;
  conv[0xe1] = 0x8c;
  conv[0xe1] = 0x8c;   // <=
  conv[0xe3] = 0x0;
  ....
}

ITK

V519 The 'offset[1]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 41, 42. itkpointsettospatialobjectdemonsregistrationtest.cxx 42


int itkPointSetToSpatialObjectDemonsRegistrationTest(....)
{
  ....
  // Set its position
  EllipseType::TransformType::OffsetType offset;
  offset[0]=50;
  offset[1]=50;
  offset[1]=50;
  ....
}

ITK

V519 The 'm_VoronoiBoundaryOrigin[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 74, 75. itkvoronoidiagram2d.hxx 75


template< typename TCoordRepType >
void
VoronoiDiagram2D< TCoordRepType >::SetOrigin(PointType vorsize)
{
  m_VoronoiBoundaryOrigin[0] = vorsize[0];
  m_VoronoiBoundaryOrigin[0] = vorsize[1];
}

ITK

V519 The 'm_SplitEpsilon' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 35, 39. itkquickproplearningrule.hxx 39


template<typename LayerType, typename TTargetVector>
QuickPropLearningRule <LayerType,TTargetVector>
::QuickPropLearningRule()
{
  m_Momentum = 0.9; //Default
  m_Max_Growth_Factor = 1.75;
  m_Decay = -0.0001;
  m_SplitEpsilon = 1;
  m_Epsilon = 0.55;
  m_Threshold = 0.0;
  m_SigmoidPrimeOffset = 0;
  m_SplitEpsilon = 0;
}

Oracle VM Virtual Box

V519 The 'wcLeft' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 472, 473. supr3hardenedmain-win.cpp 473


static bool supR3HardenedWinVerifyCacheIsMatch(....)
{
  ....
  wcLeft = wcLeft  != '/' ? RT_C_TO_LOWER(wcLeft)  : '\\';
  wcLeft = wcRight != '/' ? RT_C_TO_LOWER(wcRight) : '\\';  // <=
  if (wcLeft != wcRight)
    return false;
  ....
}

Oracle VM Virtual Box

V519 The 'pci_conf[0xa0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 806, 807. devpci.cpp 807


static void pciR3Piix3Reset(PIIX3State *d)
{
  ....
  pci_conf[0x82] = 0x02;
  pci_conf[0xa0] = 0x08;  // <=
  pci_conf[0xa0] = 0x08;  // <=
  pci_conf[0xa2] = 0x00;
  pci_conf[0xa3] = 0x00;
  pci_conf[0xa4] = 0x00;
  pci_conf[0xa5] = 0x00;
  pci_conf[0xa6] = 0x00;
  pci_conf[0xa7] = 0x00;
  pci_conf[0xa8] = 0x0f;
  ....
}

Oracle VM Virtual Box

V519 The 'ch' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1135, 1136. vboxcpp.cpp 1136


static void
vbcppProcessSkipWhiteAndEscapedEol(PSCMSTREAM pStrmInput)
{
  ....
  if (ch == '\r' || ch == '\n')
  {
    ....
  }
  else if (RT_C_IS_SPACE(ch))
  {
    ch = chPrev;                        // <=
    ch = ScmStreamGetCh(pStrmInput);    // <=
    Assert(ch == chPrev);
  }
  else
    break;
  ....
}

It is logical to assume that the operands of the assignment operator are swapped by mistake and it is the previous character that should be saved in this code: chPrev = ch;


Miranda NG

V519 The 'rc.left' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 583, 585. Miranda hotkey_opts.cpp 585


static INT_PTR CALLBACK sttOptionsDlgProc(....)
{
  ....
  rc.left += 10;
  rc.left = prefix + width * 0;
  ....
}

Similar errors can be found in some other places:

  • V519 The 'gtxl.codepage' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 896, 897. Scriver msglog.cpp 897
  • V519 The 'avatarWidth' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 537, 545. Scriver msgdialog.cpp 545
  • V519 The 'm_bf.AlphaFormat' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 856, 858. TabSRMM themes.cpp 858
  • And 11 additional diagnostic messages.

Miranda NG

V519 The 'm_proto->m_options.IgnoreRosterGroups' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1770, 1773. Jabber jabber_opt.cpp 1773


void OnApply()
{
  ....
  case ACC_FBOOK:
    m_proto->m_options.IgnoreRosterGroups = TRUE;

  case ACC_OK:
    m_proto->m_options.IgnoreRosterGroups = TRUE;
    m_proto->m_options.UseSSL = FALSE;
    m_proto->m_options.UseTLS = TRUE;

  case ACC_TLS:
  case ACC_LJTALK:
  case ACC_SMS:
    m_proto->m_options.UseSSL = FALSE;
    m_proto->m_options.UseTLS = TRUE;
    break;
  ....
}

Miranda NG

V519 The 'b->bPushed' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 358, 359. TopToolBar toolbar.cpp 359


INT_PTR TTBSetState(WPARAM wParam, LPARAM lParam)
{
  mir_cslock lck(csButtonsHook);

  TopButtonInt *b = idtopos(wParam);
  if (b == NULL)
    return -1;

  b->bPushed = (lParam & TTBST_PUSHED) ? TRUE : FALSE;
  b->bPushed = (lParam & TTBST_RELEASED) ? FALSE : TRUE;
  b->SetBitmap();
  return 0;
}

Spring Engine

V519 The 'pTexture->achFormatHint[2]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 663, 664. assimp q3bspfileimporter.cpp 664


bool Q3BSPFileImporter::importTextureFromArchive(....)
{
  ....
  pTexture->achFormatHint[ 0 ] = ext[ 0 ];
  pTexture->achFormatHint[ 1 ] = ext[ 1 ];
  pTexture->achFormatHint[ 2 ] = ext[ 2 ];
  pTexture->achFormatHint[ 2 ] = '\0';
  ....
}

Linux Kernel

V519 The 'f->fmt.vbi.samples_per_line' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1001, 1002. saa7164-vbi.c 1002


/* Raw VBI */
struct v4l2_vbi_format {
  __u32  sampling_rate;    /* in 1 Hz */
  __u32  offset;
  __u32  samples_per_line;
  __u32  sample_format;    /* V4L2_PIX_FMT_* */
  __s32  start[2];
  __u32  count[2];
  __u32  flags;            /* V4L2_VBI_* */
  __u32  reserved[2];      /* must be zero */
};

static int saa7164_vbi_fmt(struct file *file, void *priv,
                           struct v4l2_format *f)
{
  /* ntsc */
  f->fmt.vbi.samples_per_line = 1600;                       // <=
  f->fmt.vbi.samples_per_line = 1440;                       // <=
  f->fmt.vbi.sampling_rate = 27000000;
  f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
  f->fmt.vbi.offset = 0;
  f->fmt.vbi.flags = 0;
  f->fmt.vbi.start[0] = 10;
  f->fmt.vbi.count[0] = 18;
  f->fmt.vbi.start[1] = 263 + 10 + 1;
  f->fmt.vbi.count[1] = 18;
  return 0;
}

Linux Kernel

V519 The 'f->fmt.vbi.samples_per_line' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1001, 1002. saa7164-vbi.c 1002


/* Raw VBI */
struct v4l2_vbi_format {
  __u32  sampling_rate;    /* in 1 Hz */
  __u32  offset;
  __u32  samples_per_line;
  __u32  sample_format;    /* V4L2_PIX_FMT_* */
  __s32  start[2];
  __u32  count[2];
  __u32  flags;            /* V4L2_VBI_* */
  __u32  reserved[2];      /* must be zero */
};

static int saa7164_vbi_fmt(struct file *file, void *priv,
                           struct v4l2_format *f)
{
  /* ntsc */
  f->fmt.vbi.samples_per_line = 1600;                       // <=
  f->fmt.vbi.samples_per_line = 1440;                       // <=
  f->fmt.vbi.sampling_rate = 27000000;
  f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
  f->fmt.vbi.offset = 0;
  f->fmt.vbi.flags = 0;
  f->fmt.vbi.start[0] = 10;
  f->fmt.vbi.count[0] = 18;
  f->fmt.vbi.start[1] = 263 + 10 + 1;
  f->fmt.vbi.count[1] = 18;
  return 0;
}

Linux Kernel

V519 The 'params->numberoflines' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 118, 119. saa7164-vbi.c 119


struct tmHWStreamParameters {
  u32  bitspersample;
  u32  samplesperline;
  u32  numberoflines;
  u32  pitch;
  u32  linethreshold;
  u64  **pagetablelistvirt;
  u64  *pagetablelistphys;
  u32  numpagetables;
  u32  numpagetableentries;
};

/* Dynamic buffer switch at vbi start time */
static int saa7164_vbi_buffers_alloc(struct saa7164_port *port)
{
  ....
  /* Init and establish defaults */
  params->samplesperline = 1440;
  params->numberoflines = 12;                           // <=
  params->numberoflines = 18;                           // <=
  params->pitch = 1600;                                 // <=
  params->pitch = 1440;                                 // <=
  params->numpagetables = 2 +
    ((params->numberoflines * params->pitch) / PAGE_SIZE);
  params->bitspersample = 8;
  params->linethreshold = 0;
  params->pagetablelistvirt = NULL;
  params->pagetablelistphys = NULL;
  params->numpagetableentries = port->hwcfg.buffercount;
  ....
}

Similar errors can be found in some other places:

  • V519 The 'params->pitch' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 120, 121. saa7164-vbi.c 121

LibreOffice

V519 The 'pArr[2]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3735, 3736. unotbl.cxx 3736


uno::Sequence< OUString >
SwXTextTable::getSupportedServiceNames(void)
{
  uno::Sequence< OUString > aRet(4);
  OUString* pArr = aRet.getArray();
  pArr[0] = "com.sun.star.document.LinkTarget";
  pArr[1] = "com.sun.star.text.TextTable";
  pArr[2] = "com.sun.star.text.TextContent";
  pArr[2] = "com.sun.star.text.TextSortable";
  return aRet;
}

LibreOffice

V519 The 'aSNS[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 137, 138. driver.cxx 138


Sequence< OUString > FirebirdDriver::
  getSupportedServiceNames_Static() throw (RuntimeException)
{
  Sequence< OUString > aSNS( 2 );
  aSNS[0] = "com.sun.star.sdbc.Driver";
  aSNS[0] = "com.sun.star.sdbcx.Driver";
  return aSNS;
}

LibreOffice

V519 The 'mbMirrored' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 415, 416. tabbar.cxx 416


void TabBar::ImplInit( WinBits nWinStyle )
{
  ....
  mbMirrored = false;
  mbMirrored = false;
  ....
}

Similar errors can be found in some other places:

  • V519 The 'aParam.mpPreviewFontSet' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4561, 4562. output2.cxx 4562

Haiku Operation System

V519 The 'data->error' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 222, 223. repo_solv.c 223


static unsigned char *
data_read_idarray(.... , Repodata *data)
{
  ....
  data->error = pool_error(            // <=
    data->repo->pool, SOLV_ERROR_ID_RANGE,
    "data_read_idarray: id too large (%u/%u)", x, max);
  data->error = SOLV_ERROR_ID_RANGE;   // <=
  ....
}

Godot Engine

V519 The 'ret[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 305, 306. physics_server.cpp 306


Array PhysicsDirectSpaceState::_cast_motion(....)
{
  ....
  Array ret(true);
  ret.resize(2);
  ret[0]=closest_safe;
  ret[0]=closest_unsafe;
  return ret;
}

Similar errors can be found in some other places:

  • V519 The 'ret[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 287, 288. physics_2d_server.cpp 288

SETI@home

V519 The 'retval' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 450, 452. seti.cpp 452


int checkpoint(BOOLEAN force_checkpoint)
{
  int retval=0, i, l=xml_indent_level;
  ....
  retval = (int)state_file.write(str.c_str(), str.size(), 1);
  // ancillary data
  retval = state_file.printf(
    "<bs_score>%f</bs_score>\n"
    "<bs_bin>%d</bs_bin>\n"
    "<bs_fft_ind>%d</bs_fft_ind>\n",
    best_spike->score,
    best_spike->bin,
    best_spike->fft_ind);
  ....
}

Similar errors can be found in some other places:

  • V519 The 'retval' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 470, 472. seti.cpp 472
  • V519 The 'retval' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 490, 492. seti.cpp 492
  • V519 The 'retval' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 513, 515. seti.cpp 515
  • And 2 additional diagnostic messages.

Unreal Engine 4

V519 The 'ApplyNow.VisibilityOnSuccess' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 191, 197. staticlightingsystem.cpp 197


void FStaticLightingManager::SendBuildDoneNotification(....)
{
  ....
  FNotificationButtonInfo ApplyNow = FNotificationButtonInfo(
    LOCTEXT( "LightBuildKeep", "Apply Now" ),
    LOCTEXT( "LightBuildKeepToolTip", "...." ),
    FSimpleDelegate::CreateStatic(....) );
  ApplyNow.VisibilityOnSuccess = EVisibility::Collapsed;

  FNotificationButtonInfo Discard = FNotificationButtonInfo(
    LOCTEXT( "LightBuildDiscard", "Discard" ),
    LOCTEXT( "LightBuildDiscardToolTip", "...." ),
    FSimpleDelegate::CreateStatic(....) );
  ApplyNow.VisibilityOnSuccess = EVisibility::Collapsed;  // <=
  ....
}

Open CASCADE Technology

V519 The 'myIndex[1]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 60, 61. brepmesh_pairofindex.hxx 61


//! Prepends index to the pair.
inline void Prepend(const Standard_Integer theIndex)
{
  if (myIndex[1] >= 0)
    Standard_OutOfRange::Raise ("BRepMesh_PairOfIndex....");

  myIndex[1] = myIndex[0];
  myIndex[1] = theIndex;
}

Apple II emulator

V519 The 'eThis' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 5593, 5595. debug.cpp 5595


Update_t CmdOutputPrintf (int nArgs)
{
  ....
  switch( c )
  {
    case '\\':
      eThis = PS_ESCAPE;
    case '%':
      eThis = PS_TYPE;
      break;
    default:
      sText[ nLen++ ] = c;
      break;
  }
  ....
}

Someone forgot to write 'break' operator here.


Gamer_Z eXtreme Party

V519 The 'iModel' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1444, 1446. nativesavehiclelocations.cxx 1446


int GetRandomVehicleModel(int iGroup)
{
  ....
  case POPCYCLE_GROUP_AIRCREW:
    iModel = Aircrew_Vehicles[rand() % Aircrew_Vehicles.size()];
    break;
  case POPCYCLE_GROUP_GOLFERS:
    iModel = VEH_TYPE_CADDY;
  case POPCYCLE_GROUP_OUT_OF_TOWN_FACTORY:
    iModel = OFTF_Vehicles[rand() % OFTF_Vehicles.size()];
    break;
  }
  return iModel;
}

Someone forgot to write 'break' operator here.


Doxygen

V519 The '* outListType1' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 8326, 8327. util.cpp 8327


void convertProtectionLevel(MemberListType inListType,
                            int *outListType1,
                            int *outListType2)
{
  static bool extractPrivate;
  ....
  switch (inListType)
  {
  ....
  case MemberListType_priSlots:
    if (extractPrivate)
    {
      *outListType1=MemberListType_pubSlots;
      *outListType1=MemberListType_proSlots;      // <=
    }
    else
    {
      *outListType1=-1;
      *outListType2=-1;
    }
    break;
  ....
  }
}

Similar errors can be found in some other places:

  • V519 The 'da->type' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 5741, 5742. doxygen.cpp 5742

Doxygen

V519 The 'pageTitle' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 970, 971. vhdldocgen.cpp 971


QCString VhdlDocGen::getClassTitle(const ClassDef *cd)
{
  QCString pageTitle;
  if (cd == 0)
    return "";
  pageTitle += cd->displayName();
  pageTitle = VhdlDocGen::getClassName(cd);
  ....
}

Similar errors can be found in some other places:

  • V519 The 'nn' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2166, 2167. vhdldocgen.cpp 2167

Telegram

V519 The 'dir' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2084, 2085. Telegram text.cpp 2085


bool eBidiItemize(....)
{
  ....
  dir = QChar::DirON; status.eor = QChar::DirEN;
  dir = QChar::DirAN;
  ....
}

FreeSWITCH

V519 The 'status' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 365, 368. fscoredb.cpp 368


JS_COREDB_FUNCTION_IMPL(BindInt)
{
  bool status;
  ....
  /* convert args */
  status = !info[0].IsEmpty() && info[0]->IsInt32() ? true:false;
  param_index = info[0]->Int32Value();

  status = !info[1].IsEmpty() && info[1]->IsInt32() ? true:false;
  param_value = info[1]->Int32Value();

  if (param_index < 1) {
    info.GetIsolate()->ThrowException(....);
    return;
  }
  ....
}

FreeSWITCH

V519 The 'status' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1239, 1240. switch_core_io.c 1240


SWITCH_DECLARE(switch_status_t)
switch_core_session_write_frame(...., int stream_id)
{
  ....
  if (ptime_mismatch && status != SWITCH_STATUS_GENERR) {
    status = perform_write(session, frame, flags, stream_id);
    status = SWITCH_STATUS_SUCCESS;
    goto error;
  }
  ....
}

FreeSWITCH

V519 The '* e' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1438, 1439. switch_xml.c 1439


static int preprocess(....)
{
  ....
  if ((e = strstr(tcmd, "/>"))) {
    *e += 2;
    *e = '\0';
    if (fwrite(e, 1, (unsigned) strlen(e),
          write_fd) != (int) strlen(e)) {
      switch_log_printf(....);
    }
  }
  ....
}

Wine Is Not an Emulator

V519 The 'res' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 5905, 5907. action.c 5907


static void test_publish_components(void)
{
  ....
  res = RegCreateKeyExA(....);
  res = RegSetValueExA(....);
  ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res);
  RegCloseKey(key);
....
}

Unreal Engine 4

V519 The 'ActualBackgroundColor.A' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 938, 940. widgetcomponent.cpp 940


void UWidgetComponent::UpdateRenderTarget()
{
  ....
  FLinearColor ActualBackgroundColor = BackgroundColor;
  switch ( BlendMode )
  {
  case EWidgetBlendMode::Opaque:
    ActualBackgroundColor.A = 1.0f;
  case EWidgetBlendMode::Masked:
    ActualBackgroundColor.A = 0.0f;
  }
  ....
}

OpenMW

V519 The 'state.mWaterLevel' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 619, 621. cellstore.cpp 621


void CellStore::saveState (ESM::CellState& state) const
{
  ....
  if (mCell->mData.mFlags & ESM::Cell::Interior &&
      mCell->mData.mFlags & ESM::Cell::HasWater)
    state.mWaterLevel = mWaterLevel;

  state.mWaterLevel = mWaterLevel;
  ....
}

Lugaru

V519 The 'velocity' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 6764, 6765. - ADDITIONAL IN CURRENT person.cpp 6765


void Person::DoStuff(){
  ....
  XYZ velocity;
  ....
  if(velspeed<multiplier*600*scale){
    velocity=0;
  } else velocity-=velocity/velspeed*multiplier*600*scale;
  velocity=0;
  ....
}

Oracle VM Virtual Box

V519 The 'pThis->aCSR[103]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1230, 1231. devpcnet.cpp 1231


static void pcnetSoftReset(PPCNETSTATE pThis)
{
  ....
  pThis->aCSR[94]  = 0x0000;
  pThis->aCSR[100] = 0x0200;
  pThis->aCSR[103] = 0x0105; // <=
  pThis->aCSR[103] = 0x0105; // <=
  ....
}

The GTK+ Project

V519 The 'impl_class->set_functions' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 5760, 5761. gdkwindow-x11.c 5761


static void
gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
{
  ....
  GdkWindowImplClass *impl_class = GDK_WINDOW_IMPL_CLASS (klass);
  ....
  impl_class->set_decorations = gdk_x11_window_set_decorations;
  impl_class->get_decorations = gdk_x11_window_get_decorations;
  impl_class->set_functions = gdk_x11_window_set_functions;
  impl_class->set_functions = gdk_x11_window_set_functions;
  ....
}

The GTK+ Project

V519 The 'impl_class->set_functions' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1613, 1614. gdkwindow-broadway.c 1614


static void
gdk_window_impl_broadway_class_init
  (GdkWindowImplBroadwayClass *klass)
{
  ....
  GdkWindowImplClass *impl_class = GDK_WINDOW_IMPL_CLASS (klass);
  ....
  impl_class->set_functions =
    gdk_broadway_window_set_functions;
  impl_class->set_functions =
    gdk_broadway_window_set_functions;
  ....
}

The GTK+ Project

V519 The 'type' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 187, 189. testselection.c 189


void
selection_get (....
               guint      info,
               ....)
{
  ....
  switch (info)
    {
    case COMPOUND_TEXT:
    case TEXT:
      type = seltypes[COMPOUND_TEXT];
    case STRING:
      type = seltypes[STRING];
    }
  ....
}

ReactOS

V519 The 'ctxt->dataFd' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1790, 1791. nanoftp.c 1791


Int xmlNanoFTPList(....)
{
 ....
 closesocket(ctxt->dataFd); ctxt->dataFd = INVALID_SOCKET; // <=
 ctxt->dataFd = INVALID_SOCKET;                            // <=
 ....
}

Open X-Ray Engine

V519 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 57, 58. relation_registry.cpp 58


RELATION_REGISTRY::RELATION_MAP_SPOTS::RELATION_MAP_SPOTS()
{
  ....
  spot_names[ALife::eRelationTypeWorstEnemy] = "enemy_location";
  spot_names[ALife::eRelationTypeWorstEnemy] = "enemy_location";
  ....
}

Casablanca

V519 The 'res.low' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 130, 131. BlackJack_Client140 messagetypes.h 131


struct NumericHandValues
{
  int low;
  int high;
  int Best() { return (high < 22) ? high : low; }
};

NumericHandValues GetNumericValues()
{
  NumericHandValues res;
  res.low = 0;
  res.low = 0;
  ....
}

OpenSSL

V519 The 'env->version' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 907, 908. cms_env.c 908


static void cms_env_set_version(CMS_EnvelopedData *env)
{
  ....
  if (env->originatorInfo || env->unprotectedAttrs)
    env->version = 2;
  env->version = 0;
}

CryEngine V

V519 The 'm_auBlendFactor[2]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 904, 905. ccrydxgldevicecontext.cpp 905


void CCryDXGLDeviceContext::
  OMSetBlendState(....const FLOAT BlendFactor[4], ....)
{
  ....
  m_uSampleMask = SampleMask;
  if (BlendFactor == NULL)
  {
    m_auBlendFactor[0] = 1.0f;
    m_auBlendFactor[1] = 1.0f;
    m_auBlendFactor[2] = 1.0f;                   // <=
    m_auBlendFactor[2] = 1.0f;                   // <=
  }
  else
  {
    m_auBlendFactor[0] = BlendFactor[0];
    m_auBlendFactor[1] = BlendFactor[1];
    m_auBlendFactor[2] = BlendFactor[2];         // <=
    m_auBlendFactor[2] = BlendFactor[3];         // <=
  }

  m_pContext->SetBlendColor(m_auBlendFactor[0],
                            m_auBlendFactor[1],
                            m_auBlendFactor[2],
                            m_auBlendFactor[3]);
  m_pContext->SetSampleMask(m_uSampleMask);
  ....
}

GCC

V519 The 'structures' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 842, 845. gengtype.c 845


type_p
find_structure (const char *name, enum typekind kind)
{
  ....
  structures = s;                   // <=
  s->kind = kind;
  s->u.s.tag = name;
  structures = s;                   // <=
  return s;
}

GCC

V519 The 'bb_copy' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1076, 1078. cfg.c 1078


void
free_original_copy_tables (void)
{
  gcc_assert (original_copy_bb_pool);
  delete bb_copy;
  bb_copy = NULL;
  delete bb_original;
  bb_copy = NULL;                // <=
  delete loop_copy;
  loop_copy = NULL;
  delete original_copy_bb_pool;
  original_copy_bb_pool = NULL;
}

GCC

V519 The 'has_avx512vl' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 500, 501. driver-i386.c 501


const char *host_detect_local_cpu (int argc, const char **argv)
{
  unsigned int has_avx512vl = 0;
  unsigned int has_avx512ifma = 0;
  ....
  has_avx512dq = ebx & bit_AVX512DQ;
  has_avx512bw = ebx & bit_AVX512BW;
  has_avx512vl = ebx & bit_AVX512VL;       // <=
  has_avx512vl = ebx & bit_AVX512IFMA;     // <=
  ....
}

Most likely this is what should be written here: has_avx512ifma = ebx & bit_AVX512IFMA;


GCC

V519 The 'steptype' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 5173, 5174. tree-ssa-loop-ivopts.c 5174


static void
cand_value_at (....)
{
  aff_tree step, delta, nit;
  struct iv *iv = cand->iv;
  tree type = TREE_TYPE (iv->base);
  tree steptype = type;
  if (POINTER_TYPE_P (type))
    steptype = sizetype;
  steptype = unsigned_type_for (type);
  ....
}

GCC

V519 The 'nargs' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 39951, 39952. i386.c 39952


static rtx
ix86_expand_sse_pcmpistr (....)
{
  unsigned int i, nargs;
  ....
    case V8DI_FTYPE_V8DI_V8DI_V8DI_INT_UQI:
    case V16SI_FTYPE_V16SI_V16SI_V16SI_INT_UHI:
    case V2DF_FTYPE_V2DF_V2DF_V2DI_INT_UQI:
    case V4SF_FTYPE_V4SF_V4SF_V4SI_INT_UQI:
    case V8SF_FTYPE_V8SF_V8SF_V8SI_INT_UQI:
    case V8SI_FTYPE_V8SI_V8SI_V8SI_INT_UQI:
    case V4DF_FTYPE_V4DF_V4DF_V4DI_INT_UQI:
    case V4DI_FTYPE_V4DI_V4DI_V4DI_INT_UQI:
    case V4SI_FTYPE_V4SI_V4SI_V4SI_INT_UQI:
    case V2DI_FTYPE_V2DI_V2DI_V2DI_INT_UQI:
      nargs = 5;
      nargs = 5;
      mask_pos = 1;
      nargs_constant = 1;
      break;
  ....
}

Blender

V519 The 'cfranext' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 447, 454. anim_draw.c 454


static bool find_prev_next_keyframes(....)
{
  ....
  do {
     aknext = (ActKeyColumn *)BLI_dlrbTree_search_next(
               &keys, compare_ak_cfraPtr, &cfranext);
     if (aknext) {
       if (CFRA == (int)aknext->cfra) {
        cfranext = aknext->cfra; //<-
       }
       else {
        if (++nextcount == U.view_frame_keyframes)
                    donenext = true;
       }
       cfranext = aknext->cfra;    //<-
     }
    } while ((aknext != NULL) && (donenext == false));
  ....
}

ReOpenLDAP

V519 The 'ca.argv' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 7774, 7776. bconfig.c 7776


int
config_back_initialize( BackendInfo *bi )
{
  ....
  ca.argv = argv;      // <=
  argv[ 0 ] = "slapd";
  ca.argv = argv;      // <=
  ca.argc = 3;
  ca.fname = argv[0];
  ....
}

GDB

V519 The 'new_line' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 253, 256. source.c 256


FILE *
annotate_source (Source_File *sf, unsigned int max_width,
     void (*annote) (char *, unsigned int, int, void *),
     void *arg)
{
  ....
  bfd_boolean new_line;
  ....
  for (i = 0; i < nread; ++i)
  {
    if (new_line)
      {
        (*annote) (annotation, max_width, line_num, arg);
        fputs (annotation, ofp);
        ++line_num;
        new_line = FALSE;
      }

    new_line = (buf[i] == '\n');
    fputc (buf[i], ofp);
  }
  ....
}

GDB

V519 The 'alt' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 14098, 14107. i386-dis.c 14107


static int
putop (const char *in_template, int sizeflag)
{
  int alt = 0;
  ....
  switch (*p)
  {
    ....
    case '{':
      alt = 0;
      if (intel_syntax)
      {
        while (*++p != '|')
         if (*p == '}' || *p == '\0')
           abort ();
      }
      /* Fall through.  */
    case 'I':
      alt = 1;
      continue;
    ....
  }
}

GDB

V519 The 'name' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3433, 3436. stabs.c 3436


static debug_type
stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
                         int typenum)
{
  ....
  switch (-typenum)
  {
    ....
    case 8:
      name = "unsigned int";
      rettype = debug_make_int_type (dhandle, 4, TRUE);
      break;
    case 9:
      name = "unsigned";
      rettype = debug_make_int_type (dhandle, 4, TRUE);
    case 10:
      name = "unsigned long";
      rettype = debug_make_int_type (dhandle, 4, TRUE);
      break;
    ....
  }
  ....
}

ICQ

V519 The 'voipProxySettings.type' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 171, 172. core im_container.cpp 172

V519 The 'voipProxySettings.type' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 172, 173. core im_container.cpp 173

V519 The 'voipProxySettings.type' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 173, 174. core im_container.cpp 174


void core::im_container::fromInternalProxySettings2Voip(....)
{
  ....
  switch (proxySettings.proxy_type_) {
  case 0: voipProxySettings.type =
            VoipProxySettings::kProxyType_Http;
  case 4: voipProxySettings.type =
            VoipProxySettings::kProxyType_Socks4;
  case 5: voipProxySettings.type =
            VoipProxySettings::kProxyType_Socks5;
  case 6: voipProxySettings.type =
            VoipProxySettings::kProxyType_Socks4a;
  default: voipProxySettings.type =
             VoipProxySettings::kProxyType_None;
  }
  ....
}

ICQ

V519 The 'cursor' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 51, 53. core hmac_sha_base64.cpp 53


int32_t base64::base64_decode(uint8_t *source, int32_t length,
                              uint8_t *dst)
{
  uint32_t cursor =0xFF00FF00, temp =0;
  int32_t i=0,size =0;
  cursor = 0;
  ....
}

GNU GRUB

V519 The 'regs.ebx' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 312, 313. vbe.c 313


struct grub_bios_int_registers
{
  grub_uint32_t eax;
  grub_uint16_t es;
  grub_uint16_t ds;
  grub_uint16_t flags;
  grub_uint16_t dummy;
  grub_uint32_t ebx;
  grub_uint32_t ecx;
  grub_uint32_t edi;
  grub_uint32_t esi;
  grub_uint32_t edx;
};

grub_vbe_status_t
grub_vbe_bios_getset_dac_palette_width (....)
{
  struct grub_bios_int_registers regs;

  regs.eax = 0x4f08;
  regs.ebx = (*dac_mask_size & 0xff) >> 8;
  regs.ebx = set ? 1 : 0;
  ....
}

Chromium

V519 The '* list' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 136, 138. util.cc 138


bool GetListName(ListType list_id, std::string* list)
{
  switch (list_id) {
    ....
    case IPBLACKLIST:
      *list = kIPBlacklist;
      break;
    case UNWANTEDURL:
      *list = kUnwantedUrlList;
      break;
    case MODULEWHITELIST:
      *list = kModuleWhitelist;              // <=
    case RESOURCEBLACKLIST:
      *list = kResourceBlacklist;
      break;
    default:
      return false;
  }
  ....
}

The break operator is missing.


CodeLite

V519 The 'm_commentEndLine' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 175, 176. PhpLexerAPI.h 176


struct WXDLLIMPEXP_CL phpLexerUserData {
  ....
  int m_commentStartLine;
  int m_commentEndLine;
  ....
  void ClearComment()
  {
    m_comment.clear();
    m_commentEndLine = wxNOT_FOUND;
    m_commentEndLine = wxNOT_FOUND;
  }
};

Similar errors can be found in some other places:

  • V519 The 'm_commentEndLine' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 171, 172. CxxLexerAPI.h 172
  • V519 The 'm_commentEndLine' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 143, 144. JSLexerAPI.h 144

Clang

V519 The 'ZeroDirective' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 25, 31. HexagonMCAsmInfo.cpp 31


HexagonMCAsmInfo::HexagonMCAsmInfo(const Triple &TT) {
  Data16bitsDirective = "\t.half\t";
  Data32bitsDirective = "\t.word\t";
  Data64bitsDirective = nullptr;
  ZeroDirective = "\t.skip\t";                            // <=
  CommentString = "//";

  LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
  InlineAsmStart = "# InlineAsm Start";
  InlineAsmEnd = "# InlineAsm End";
  ZeroDirective = "\t.space\t";                           // <=
  AscizDirective = "\t.string\t";

  SupportsDebugInformation = true;
  MinInstAlignment = 4;
  UsesELFSectionDirectiveForBSS  = true;
  ExceptionsType = ExceptionHandling::DwarfCFI;
}

Clang

V519 The 'Str' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2407, 2408. ELFDumper.cpp 2408


template <class ELFT>
void GNUStyle<ELFT>::printFileHeaders(const ELFO *Obj) {
  ....
  Str = printEnum(e->e_ident[ELF::EI_OSABI],
                  makeArrayRef(ElfOSABI));
  printFields(OS, "OS/ABI:", Str);
  Str = "0x" + to_hexString(e->e_version);                  // <=
  Str = to_hexString(e->e_ident[ELF::EI_ABIVERSION]);       // <=
  printFields(OS, "ABI Version:", Str);
  Str = printEnum(e->e_type, makeArrayRef(ElfObjectFileType));
  printFields(OS, "Type:", Str);
  ....
}

Most likely this is what should be written here: Str += to_hexString(e->e_ident[ELF::EI_ABIVERSION]);

Similar errors can be found in some other places:

  • V519 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 55, 57. coff2yaml.cpp 57
  • V519 The 'O' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 394, 395. llvm-pdbdump.cpp 395
  • V519 The 'servAddr.sin_family' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 63, 64. server.cpp 64

CMaNGOS

V519 The 'stat' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1776, 1781. DetourNavMeshQuery.cpp 1781


dtStatus dtNavMeshQuery::findStraightPath(....) const
{
  ....
  if (....)
  {
    stat = appendPortals(apexIndex, i, closestEndPos,
              path, straightPath, straightPathFlags,
              straightPathRefs, straightPathCount,
              maxStraightPath, options);
  }

  stat = appendVertex(closestEndPos, 0, path[i],
            straightPath, straightPathFlags,
            straightPathRefs, straightPathCount,
            maxStraightPath);
  ....
}

FreeBSD Kernel

V519 The 'vf->flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 5992, 5994. if_ix.c 5994


static int
ixgbe_add_vf(device_t dev, u16 vfnum, const nvlist_t *config)
{
  ....
  if (nvlist_exists_binary(config, "mac-addr")) {
    mac = nvlist_get_binary(config, "mac-addr", NULL);
    bcopy(mac, vf->ether_addr, ETHER_ADDR_LEN);
    if (nvlist_get_bool(config, "allow-set-mac"))
      vf->flags |= IXGBE_VF_CAP_MAC;
  } else
    /*
     * If the administrator has not specified a MAC address then
     * we must allow the VF to choose one.
     */
    vf->flags |= IXGBE_VF_CAP_MAC;

  vf->flags = IXGBE_VF_ACTIVE;
  ....
}

FreeBSD Kernel

V519 The 'a1' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 397, 400. ip_ftp_pxy.c 400


int
ipf_p_ftp_port(softf, fin, ip, nat, ftp, dlen)
  ipf_ftp_softc_t *softf;
  fr_info_t *fin;
  ip_t *ip;
  nat_t *nat;
  ftpinfo_t *ftp;
  int dlen;
{
  ....
  if (nat->nat_dir == NAT_INBOUND)
    a1 = ntohl(nat->nat_ndstaddr);   // <=
  else
    a1 = ntohl(ip->ip_src.s_addr);   // <=
  a1 = ntohl(ip->ip_src.s_addr);     // <=
  a2 = (a1 >> 16) & 0xff;
  a3 = (a1 >> 8) & 0xff;
  a4 = a1 & 0xff;
  ....
}

FreeBSD Kernel

V519 The 'rdata->sd_vlan_force_pri_flg' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 6327, 6328. ecore_sp.c 6328


static inline int ecore_func_send_switch_update(
  struct bxe_softc *sc,
  struct ecore_func_state_params *params)
{
  ....
  if (ECORE_TEST_BIT(ECORE_F_UPDATE_VLAN_FORCE_PRIO_FLAG,
                     &switch_update_params->changes))
     rdata->sd_vlan_force_pri_flg = 1;
  rdata->sd_vlan_force_pri_flg =
    switch_update_params->vlan_force_prio;
  ....
}

FreeBSD Kernel

V519 The 'sysctl_log_level' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 423, 424. alias_sctp.c 424


static u_int sysctl_log_level = 0;

int sysctl_chg_loglevel(SYSCTL_HANDLER_ARGS)
{
  u_int level = *(u_int *)arg1;
  int error;
  error = sysctl_handle_int(oidp, &level, 0, req);
  if (error) return (error);

  sysctl_log_level =
    (level > SN_LOG_DEBUG_MAX)?(SN_LOG_DEBUG_MAX):(level);
  sysctl_log_level =
    (level < SN_LOG_LOW)?(SN_LOG_LOW):(level);

  return (0);
}

FreeBSD Kernel

V519 The 'lmask.__mask' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 594, 595. linux32_sysvec.c 595


typedef struct {
  uint64_t  __mask;
} l_sigset_t;

int
linux_sigreturn(struct thread *td,
                struct linux_sigreturn_args *args)
{
  l_sigset_t lmask;
  ....
  lmask.__mask = frame.sf_sc.sc_mask;
  lmask.__mask = frame.sf_extramask[0];
  ....
}

FreeBSD Kernel

V519 The 'pmuctrl' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2025, 2026. bhnd_pmu_subr.c 2026


static void
bhnd_pmu1_pllinit0(struct bhnd_pmu_softc *sc, uint32_t xtal)
{
  uint32_t pmuctrl;
  ....
  /* Write XtalFreq. Set the divisor also. */
  pmuctrl = BHND_PMU_READ_4(sc, BHND_PMU_CTRL);
  pmuctrl = ~(BHND_PMU_CTRL_ILP_DIV_MASK |
              BHND_PMU_CTRL_XTALFREQ_MASK);
  pmuctrl |= BHND_PMU_SET_BITS(((xt->fref + 127) / 128) - 1,
             BHND_PMU_CTRL_ILP_DIV);
  pmuctrl |= BHND_PMU_SET_BITS(xt->xf, BHND_PMU_CTRL_XTALFREQ);
  ....
}

FreeBSD Kernel

V519 The 'chunk->flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1566, 1567. if_uath.c 1567


static int
uath_tx_start(struct uath_softc *sc, struct mbuf *m0,
              struct ieee80211_node *ni, struct uath_data *data)
{
  ....
  chunk->flags = (m0->m_flags & M_FRAG) ? 0 : UATH_CFLAGS_FINAL;
  if (m0->m_flags & M_LASTFRAG)
    chunk->flags |= UATH_CFLAGS_FINAL;
  chunk->flags = UATH_CFLAGS_FINAL;
  ....
}

FreeBSD Kernel

V519 The 'lvds_pll_feedback_div' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 287, 290. dvo_ch7017.c 290


static void ch7017_mode_set(....)
{
  uint8_t lvds_pll_feedback_div, lvds_pll_vco_control;
  ....
  lvds_pll_feedback_div =
    CH7017_LVDS_PLL_FEEDBACK_DEFAULT_RESERVED |
    (2 << CH7017_LVDS_PLL_FEED_BACK_DIVIDER_SHIFT) |
    (3 << CH7017_LVDS_PLL_FEED_FORWARD_DIVIDER_SHIFT);
  lvds_pll_feedback_div = 35;
  ....
}

FreeBSD Kernel

V519 The 'msgbuf[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 422, 426. e1000_vf.c 426


void e1000_update_mc_addr_list_vf(struct e1000_hw *hw,
  u8 *mc_addr_list, u32 mc_addr_count)
{
  ....
  if (mc_addr_count > 30) {
    msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW;
    mc_addr_count = 30;
  }

  msgbuf[0] = E1000_VF_SET_MULTICAST;
  msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT;
  ....
}

TensorFlow

V519 The 'v' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 172, 174. resize_area_op.cc 174


void Compute(OpKernelContext* context) override {
  ....
  int64 v = floor(in_x);
  ....
  v = ceil(in_x1);
  x_interp.end = ceil(in_x1);
  v = x_interp.end - 1;
  ....
}

Notepad++

V519 The 'lpcs' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3116, 3117. babygrid.cpp 3117


LRESULT CALLBACK GridProc(HWND hWnd, UINT message,
                          WPARAM wParam, LPARAM lParam)
{
  ....
  case WM_CREATE:
    lpcs = &cs;
    lpcs = (LPCREATESTRUCT)lParam;
  ....
}

Tizen

V519 The 'display_status' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 110, 117. view_clock.c 117


static void _keypad_down_cb(....)
{
  ....
  if (priv->input_panel_show && display_status) {
    evas_object_geometry_get(priv->base, &x, &y, &w, &h;);
    evas_object_move(priv->base, x, 0);

    display_status = false;                                // <=
  } else if (priv->input_panel_show == false && display_status) {
    evas_object_geometry_get(priv->base, &x, &y, &w, &h;);
    evas_object_move(priv->base, x, 0);

    display_status = false;                                // <=
  }
  display_status = false;                                  // <=
}

Tizen

V519 The 'ret_str' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2299, 2300. setting-password-sim.c 2300


static void _display_result_popup(....)
{
  ....
  char *ret_str = NULL;
  char tmp_str[SETTING_STR_SLP_LEN] = { 0, };
  ....
  } else {
    ....
    int ret = snprintf(tmp_str, SETTING_STR_SLP_LEN,
                      tmp_str2, result->retry_cnt);
    setting_retm_if(ret < 0, "snprintf fail");
    ret_str = tmp_str;                                     // <=
    ret_str = _("IDS_ST_POP_INCORRECT_PIN1_ATTEMPT_LEFT"); // <=
  }
  ....
}

Bind

V519 The 'xfr->txmemlen' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1173, 1182. xfrout.c 1182


static isc_result_t
xfrout_ctx_create(....)
{
  xfrout_ctx_t *xfr;
  ....
  xfr->txmemlen = 0;                  // <=
  xfr->nmsg = 0;
  xfr->many_answers = many_answers,
  xfr->sends = 0;
  xfr->shuttingdown = ISC_FALSE;
  xfr->mnemonic = NULL;
  xfr->buf.base = NULL;
  xfr->buf.length = 0;
  xfr->txmem = NULL;
  xfr->txmemlen = 0;                  // <=
  xfr->stream = NULL;
  ....
}

Similar errors can be found in some other places:

  • V519 The 'outputformat' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3524, 3526. dnssec-signzone.c 3526

Tizen

V519 The '_focused_ic' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1260, 1261. wayland_panel_agent_module.cpp 1261


void
isf_wsc_context_del (WSCContextISF *wsc_ctx)
{
  ....
  WSCContextISF* old_focused = _focused_ic;
  _focused_ic = context_scim;
  _focused_ic = old_focused;
  ....
}

Tizen

V519 The 'ad->paired_item' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1614, 1617. bt-main-view.c 1617


static void __bt_paired_item_sel_cb(void *data, Evas_Object *obj,
           void *event_info)
{
  ....
  if ((ad->waiting_service_response) &&
      (dev->service_list == 0)) {
    ERR("No service");

    ad->paired_item = item;
  }

  ad->paired_item = item;
  ....
}

Tizen

V519 The 'ttc->func.del' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 409, 416. privacy_package_list_view.c 416


void create_privacy_package_list_view(app_data_s* ad)
{
  ....
  Elm_Genlist_Item_Class *ttc = elm_genlist_item_class_new();
  Elm_Genlist_Item_Class *ptc = elm_genlist_item_class_new();
  Elm_Genlist_Item_Class *mtc = elm_genlist_item_class_new();
  ....
  ttc->item_style = "title";
  ttc->func.text_get = gl_title_text_get_cb;
  ttc->func.del = gl_del_cb;                               // <=

  ptc->item_style = "padding";
  ptc->func.del = gl_del_cb;

  mtc->item_style = "multiline";
  mtc->func.text_get = gl_multi_text_get_cb;
  ttc->func.del = gl_del_cb;                               // <=
  ....
}

Similar errors can be found in some other places:

  • V519 The 'item' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1176, 1189. w-input-stt-voice.cpp 1189

Enlightenment

V519 The 'cs->mode_refresh' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1082, 1085. e_int_config_randr2.c 1085


static int
_basic_apply(E_Config_Dialog *cfd EINA_UNUSED,
             E_Config_Dialog_Data *cfdata)
{
  ....
  cs->rel_align = cs2->rel_align;
  cs->mode_refresh = cs2->mode_refresh;       // <=
  cs->mode_w = cs2->mode_w;
  cs->mode_h = cs2->mode_h;
  cs->mode_refresh = cs2->mode_refresh;       // <=
  cs->rotation = cs2->rotation;
  ....
}

EFL Core Libraries

V519 The 'cfg.load_defaults' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 304, 309. efl_net_ssl_context.c 309


EOLIAN static Efl_Object *
_efl_net_ssl_context_efl_object_finalize(....)
{
  Efl_Net_Ssl_Ctx_Config cfg;
  ....
  cfg.load_defaults = pd->load_defaults;                   // <=
  cfg.certificates = &pd->certificates;
  cfg.private_keys = &pd->private_keys;
  cfg.certificate_revocation_lists =
          &pd->certificate_revocation_lists;
  cfg.certificate_authorities = &pd->certificate_authorities;
  cfg.load_defaults = pd->load_defaults;                   // <=
  ....
}

EFL Core Libraries

V519 The 's->maxh' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 8132, 8133. edje_edit.c 8133


EAPI Eina_Bool
edje_edit_size_class_add(Evas_Object *obj, const char *name)
{
  Eina_List *l;
  Edje_Size_Class *sc, *s;
  ....
  /* set default values for max */
  s->maxh = -1;
  s->maxh = -1;
  ....
}

Similar errors can be found in some other places:

  • V519 The 'pdata->seat->object.in' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1519, 1521. evas_events.c 1521
  • V519 The 'pdata->seat->object.in' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2597, 2599. evas_events.c 2599
  • V519 The 'b->buffer[r]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 348, 353. evas_image_load_pmaps.c 353
  • And 11 additional diagnostic messages.

ClickHouse

V519 The 'first' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 26, 33. StringRange.h 33

V519 The 'second' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 27, 34. StringRange.h 34


struct StringRange
{
  const char * first;
  const char * second;

  ....

  StringRange(TokenIterator token_begin, TokenIterator token_end)
  {
    if (token_begin == token_end)
    {
      first = token_begin->begin;                // <=
      second = token_begin->begin;               // <=
    }

    TokenIterator token_last = token_end;
    --token_last;

    first = token_begin->begin;                  // <=
    second = token_last->end;                    // <=
  }
};


Do you make errors in the code?

Check your code
with PVS-Studio

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

goto PVS-Studio;