Мы используем куки, чтобы пользоваться сайтом было удобно.
Хорошо
to the top
close form

Заполните форму в два простых шага ниже:

Ваши контактные данные:

Шаг 1
Поздравляем! У вас есть промокод!

Тип желаемой лицензии:

Шаг 2
Team license
Enterprise license
** Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности
close form
Запросите информацию о ценах
Новая лицензия
Продление лицензии
--Выберите валюту--
USD
EUR
RUB
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Бесплатная лицензия PVS‑Studio для специалистов Microsoft MVP
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Для получения лицензии для вашего открытого
проекта заполните, пожалуйста, эту форму
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Мне интересно попробовать плагин на:
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
check circle
Ваше сообщение отправлено.

Мы ответим вам на


Если вы так и не получили ответ, пожалуйста, проверьте, отфильтровано ли письмо в одну из следующих стандартных папок:

  • Промоакции
  • Оповещения
  • Спам

>
>
>
Примеры ошибок, обнаруженных с помощью …

Примеры ошибок, обнаруженных с помощью диагностики V519

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


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

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

Similar errors can be found in some other places:

  • V519 The 'saveYMask' object is assigned values twice successively. Perhaps this is a mistake. ipl iplremap.c 38
  • 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
  • And 4 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;
  ....
}

LLVM/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;
  ....
}

LLVM/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.


LLVM/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 'cddata->XAFlags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1297, 1298. cdrom.c 1297


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


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];
  ....
}

Similar errors can be found in some other places:

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

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


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

Similar errors can be found in some other places:

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

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 '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. 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


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;
  }
  ....
}

Similar errors can be found in some other places:

  • 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

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

LLVM/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;
}

LLVM/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


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;                    // <=
  }
};

Similar errors can be found in some other places:

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

Chromium

V519 CWE-563 The '* a' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1385, 1387. gles2_cmd_utils.cc 1387


void GLES2Util::GetColorFormatComponentSizes(...., int* a) {
  ....
  // Sized formats.
  switch (internal_format) {
    case GL_ALPHA8_EXT:
      *a = 8;
    case GL_ALPHA16F_EXT:
      *a = 16;
    case GL_ALPHA32F_EXT:
      *a = 32;
    case GL_RGB8_OES:
    case GL_SRGB8:
    case GL_RGB8_SNORM:
    case GL_RGB8UI:
    case GL_RGB8I:
      *r = 8;
      *g = 8;
      *b = 8;
      break;
    case GL_RGB565:
  ....
}

One forgot to write several break operators.

Similar errors can be found in some other places:

  • V519 CWE-563 The '* a' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1387, 1389. gles2_cmd_utils.cc 1389

Chromium

V519 CWE-563 The 'delete_result' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 381, 383. install_util.cc 383


InstallUtil::ConditionalDeleteResult
InstallUtil::DeleteRegistryValueIf(....) {
  ....
  ConditionalDeleteResult delete_result = NOT_FOUND;
  ....
  if (....) {
    LONG result = key.DeleteValue(value_name);
    if (result != ERROR_SUCCESS) {
      ....
      delete_result = DELETE_FAILED;
    }
    delete_result = DELETED;
  }
  return delete_result;
}

Most likely the else operator is needed here: delete_result = DELETE_FAILED; } else { delete_result = DELETED; }


Chromium

V519 CWE-563 The 'primary_id' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 106, 109. video_color_space.cc 109


gfx::ColorSpace VideoColorSpace::ToGfxColorSpace() const {
  ....
  switch (primaries) {
  ....
  case PrimaryID::SMPTEST431_2:
    primary_id = gfx::ColorSpace::PrimaryID::SMPTEST431_2;
    break;
  case PrimaryID::SMPTEST432_1:
    primary_id = gfx::ColorSpace::PrimaryID::SMPTEST432_1;
  case PrimaryID::EBU_3213_E:
    primary_id = gfx::ColorSpace::PrimaryID::INVALID;
    break;
  }
  ....
}

A developer forgot to write the break operator.


Chromium

V519 The 'group' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 145, 147. autofill_metrics.cc 147


int GetFieldTypeGroupMetric(....) {
  ....
  switch (AutofillType(field_type).group()) {
    ....
    case ADDRESS_HOME_LINE3:
      group = GROUP_ADDRESS_LINE_3;
      break;
    case ADDRESS_HOME_STREET_ADDRESS:
      group = GROUP_STREET_ADDRESS;
    case ADDRESS_HOME_CITY:
      group = GROUP_ADDRESS_CITY;
      break;
    case ADDRESS_HOME_STATE:
      group = GROUP_ADDRESS_STATE;
      break;
    ....
}

A developer forgot to write the break operator.


Chromium

V519 CWE-563 The '* offset' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3543, 3544. ax_platform_node_win.cc 3544


void AXPlatformNodeWin::HandleSpecialTextOffset(LONG* offset) {
  if (*offset == IA2_TEXT_OFFSET_LENGTH) {
    *offset = static_cast<LONG>(GetText().length());
  } else if (*offset == IA2_TEXT_OFFSET_CARET) {
    int selection_start, selection_end;
    GetSelectionOffsets(&selection_start, &selection_end);
    if (selection_end < 0)
      *offset = 0;
    *offset = static_cast<LONG>(selection_end);
  }
}

Negative values protection is implemented improperly. Here is the correct version of code: if (selection_end < 0) selection_end = 0;


Protocol Buffers

V519 CWE-563 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 149, 150. java_primitive_field_lite.cc 150


void SetPrimitiveVariables(.....,
                           std::map<string, string>* variables) {
  ....
  (*variables)["set_has_field_bit_message"] = "";
  (*variables)["set_has_field_bit_message"] = "";
  (*variables)["clear_has_field_bit_message"] = "";
  ....
}

The same key is used twice. Most likely, there's some sort of a typo and the key with a different name must be used.


WebRTC

V519 CWE-563 The 'state[state_length - x_length + i]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 83, 84. filter_ar.c 84


size_t WebRtcSpl_FilterAR(....)
{
  ....
  for (i = 0; i < state_length - x_length; i++)
  {
    state[i] = state[i + x_length];
    state_low[i] = state_low[i + x_length];
  }
  for (i = 0; i < x_length; i++)
  {
    state[state_length - x_length + i] = filtered[i];
    state[state_length - x_length + i] = filtered_low[i];  // <=
  }
  ....
}

Copy-Paste consequences. Developers forgot to change state with state_low. As a result, some part of the elements of the array state_low remain uninitialized.


ANGLE

V519 CWE-563 The '* params' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2044, 2046. state.cpp 2046


void State::getIntegerv(const Context *context,
                        GLenum pname, GLint *params)
{
  ....
  switch (pname)
  {
    ....
    case GL_DEBUG_GROUP_STACK_DEPTH:
      *params = static_cast<GLint>(mDebug.getGroupStackDepth());
       break;
    case GL_MULTISAMPLE_EXT:
      *params = static_cast<GLint>(mMultiSampling);
       break;
    case GL_SAMPLE_ALPHA_TO_ONE_EXT:
      *params = static_cast<GLint>(mSampleAlphaToOne);      // <=
    case GL_COVERAGE_MODULATION_CHROMIUM:
      *params = static_cast<GLint>(mCoverageModulation);
       break;
    case GL_ATOMIC_COUNTER_BUFFER_BINDING:
    ....
}

A developer forgot to write the break operator.


SwiftShader

V519 CWE-563 The 'framebuffer' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3879, 3881. libglesv3.cpp 3881


GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer(....)
{
  ....
  switch(target)
  {
  case GL_DRAW_FRAMEBUFFER:
  case GL_FRAMEBUFFER:
    framebuffer = context->getDrawFramebuffer();
  case GL_READ_FRAMEBUFFER:
    framebuffer = context->getReadFramebuffer();
    break;
  default:
    return error(GL_INVALID_ENUM);
  }
  ....
}

A developer forgot to write the break operator.


XNU kernel

V519 CWE-563 The 'wrap.Seal_Alg[0]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2070, 2071. gss_krb5_mech.c 2071


uint32_t
gss_krb5_3des_unwrap_mbuf(....)
{
  ....
  for (cflag = 1; cflag >= 0; cflag--) {
    *minor = gss_krb5_3des_token_get(
       ctx, &itoken, wrap, &hash, &offset, &length, reverse);
    if (*minor == 0)
      break;
    wrap.Seal_Alg[0] = 0xff;
    wrap.Seal_Alg[0] = 0xff;
  }
  ....
}

The value is written in the same element of the array twice. I looked through the near code and now I think that this was actually supposed to be written as follows: wrap.Seal_Alg[0] = 0xff; wrap.Seal_Alg[1] = 0xff;


XNU kernel

V519 CWE-563 The 'm->M_dat.MH.MH_pkthdr.csum_flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 758, 759. pf_norm.c 759


static struct mbuf *
pf_reassemble(struct mbuf *m0, struct pf_fragment **frag,
    struct pf_frent *frent, int mff)
{
  ....
  m->m_pkthdr.csum_flags &= ~CSUM_PARTIAL;
  m->m_pkthdr.csum_flags =
      CSUM_DATA_VALID | CSUM_PSEUDO_HDR |
      CSUM_IP_CHECKED | CSUM_IP_VALID;
  ....
}

The value of the variable m->m_pkthdr.csum_flags is reset.

Similar errors can be found in some other places:

  • V519 CWE-563 The 'm->M_dat.MH.MH_pkthdr.csum_flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1349, 1350. pf_norm.c 1350
  • V519 CWE-563 The 'm->M_dat.MH.MH_pkthdr.csum_flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2984, 2985. ip_input.c 2985
  • V519 CWE-563 The 'm->M_dat.MH.MH_pkthdr.csum_flags' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 773, 774. frag6.c 774

RT-Thread

V519 CWE-563 The 'reg_value' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3427, 3428. gd32f4xx_enet.c 3428


static void enet_default_init(void)
{
  ....
  reg_value = ENET_DMA_BCTL;
  reg_value &= DMA_BCTL_MASK;
  reg_value = ENET_ADDRESS_ALIGN_ENABLE
             |ENET_ARBITRATION_RXTX_2_1
             |ENET_RXDP_32BEAT |ENET_PGBL_32BEAT
             |ENET_RXTX_DIFFERENT_PGBL
             |ENET_FIXED_BURST_ENABLE |ENET_MIXED_BURST_DISABLE
             |ENET_NORMAL_DESCRIPTOR;
  ENET_DMA_BCTL = reg_value;
  ....
}

Similar errors can be found in some other places:

  • V519 CWE-563 The 'snctl' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 145, 150. gd32f4xx_exmc.c 150

RT-Thread

V519 CWE-563 The 'res' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 648, 657. sdcard.c 657


static
DRESULT sdcard_ioctl (
    rt_uint8_t drv,
    rt_uint8_t ctrl,
    void *buff
)
{
  ....
    case MMC_GET_OCR : /* Receive OCR as an R3 resp (4 bytes) */
      if (send_cmd(CMD58, 0) == 0) {    /* READ_OCR */
        for (n = 0; n < 4; n++)
          *ptr++ = rcvr_spi();
        res = RES_OK;
      }

//  case MMC_GET_TYPE :    /* Get card type flags (1 byte) */
//    *ptr = CardType;
//    res = RES_OK;
//    break;

    default:
      res = RES_PARERR;
    }

    DESELECT();
    rcvr_spi();
  }

  return res;
}

RT-Thread

V519 CWE-563 The 'clkRate' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 350, 351. system_lpc54608.c 351


void SystemCoreClockUpdate (void) {
  uint32_t clkRate = 0;
  ....
  clkRate = workRate / ((uint64_t)postdiv);
  clkRate = workRate * 2;
  ....
}

Krita

V519 The 'value' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 61, 66. kis_draggable_tool_button.cpp 66


int KisDraggableToolButton::continueDrag(const QPoint &pos)
{
    ....

    if (m_orientation == Qt::Horizontal) {
        value = diff.x(); // <=
    } else {
        value = -diff.y(); // <=
    }

    value = diff.x() - diff.y(); // <=

    return value;
}

Similar errors can be found in some other places:

  • V519 The 'uf.f' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 263, 265. lut.h 265
  • V519 The 'uf.f' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 271, 273. lut.h 273

Android

V519 CWE-563 The 'namespaceExt.prefix.index' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1535, 1539. XMLNode.cpp 1539


status_t XMLNode::flatten_node(....) const
{
  ....
  memset(&namespaceExt, 0, sizeof(namespaceExt));
  if (mNamespacePrefix.size() > 0) {
    namespaceExt.prefix.index =
      htodl(strings.offsetForString(mNamespacePrefix));
  } else {
    namespaceExt.prefix.index = htodl((uint32_t)-1);
  }
  namespaceExt.prefix.index =
    htodl(strings.offsetForString(mNamespacePrefix));
  namespaceExt.uri.index = htodl(strings.offsetForString(mNamespaceUri));
  ....
}

Android

V519 CWE-563 The 'framesToRead' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 6341, 6342. Threads.cpp 6342


bool AudioFlinger::RecordThread::threadLoop()
{
 ....
 size_t framesToRead = mBufferSize / mFrameSize;
 framesToRead = min(mRsmpInFramesOA - rear, mRsmpInFramesP2 / 2);
 ....
}

Android

V519 CWE-563 The 'codec_capability_.sample_rate' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 910, 916. a2dp_vendor_ldac.cc 916


bool A2dpCodecConfigLdac::setCodecConfig(....) {
  ....
  case BTAV_A2DP_CODEC_SAMPLE_RATE_192000:
    if (sampleRate & A2DP_LDAC_SAMPLING_FREQ_192000) {
      result_config_cie.sampleRate =
          A2DP_LDAC_SAMPLING_FREQ_192000;
      codec_capability_.sample_rate =
          codec_user_config_.sample_rate;
      codec_config_.sample_rate =
          codec_user_config_.sample_rate;
    }
  case BTAV_A2DP_CODEC_SAMPLE_RATE_16000:
  case BTAV_A2DP_CODEC_SAMPLE_RATE_24000:
  case BTAV_A2DP_CODEC_SAMPLE_RATE_NONE:
    codec_capability_.sample_rate =
        BTAV_A2DP_CODEC_SAMPLE_RATE_NONE;
    codec_config_.sample_rate =
        BTAV_A2DP_CODEC_SAMPLE_RATE_NONE;
    break;
  ....
}

Similar errors can be found in some other places:

  • V519 CWE-563 The 'codec_config_.sample_rate' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 911, 917. a2dp_vendor_ldac.cc 917

Android

V519 CWE-563 The 'V' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 307, 309. p_256_multprecision.cc 309


void multiprecision_fast_mod(uint32_t* c, uint32_t* a) {
  uint32_t U;
  uint32_t V;
  ....
  c[0] += U;
  V = c[0] < U;
  c[1] += V;
  V = c[1] < V;
  c[2] += V;                //
  V = c[2] < V;             // <=
  c[2] += U;                //
  V = c[2] < U;             // <=
  c[3] += V;
  V = c[3] < V;
  c[4] += V;
  V = c[4] < V;
  c[5] += V;
  V = c[5] < V;
  ....
}

Android

V519 CWE-563 The 'last_visited_internal_latency_' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 680, 682. scheduler_arm.cc 682


void SchedulingLatencyVisitorARM::VisitArrayGet(....) {
  ....
  if (index->IsConstant()) {
    last_visited_latency_ = kArmMemoryLoadLatency;
  } else {
    if (has_intermediate_address) {
    } else {
      last_visited_internal_latency_ += kArmIntegerOpLatency;
    }
    last_visited_internal_latency_ = kArmMemoryLoadLatency;
  }
  ....
}

Qt

V519 CWE-563 The 'lastNamespaceDeclaration' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3188, 3194. qxmlstream.cpp 3194


bool QXmlStreamWriterPrivate::finishStartElement(bool contents)
{
  ....
  if (inEmptyElement) {
    write("/>");
    QXmlStreamWriterPrivate::Tag &tag = tagStack_pop();
    lastNamespaceDeclaration = tag.namespaceDeclarationsSize;
    lastWasStartElement = false;
  } else {
    write(">");
  }
  inStartElement = inEmptyElement = false;
  lastNamespaceDeclaration = namespaceDeclarations.size();
  return hadSomethingWritten;
}

Qt

V519 CWE-563 The 'done' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 509, 511. qeffects.cpp 511


void QRollEffect::scroll()
{
  ....
  if (currentHeight != totalHeight) {
    currentHeight = totalHeight * (elapsed/duration)
        + (2 * totalHeight * (elapsed%duration) + duration)
        / (2 * duration);
    // equiv. to int((totalHeight*elapsed) / duration + 0.5)
    done = (currentHeight >= totalHeight);
  }
  done = (currentHeight >= totalHeight) &&
         (currentWidth >= totalWidth);
  ....
}

Godot Engine

V519 CWE-563 The 'p.velocity.z' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 664, 665. cpu_particles.cpp 665


void CPUParticles::_particles_process(float p_delta) {
  ....
  if (flags[FLAG_DISABLE_Z]) {
    p.velocity.z = 0.0;
    p.velocity.z = 0.0;
  }
  ....
}

Most likely this is what should be written here: p.velocity.z = 0.0; p.transform.origin.z = 0.0;


NCBI Genome Workbench

V519 The 'interval_width' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 454, 456. aln_writer.cpp 456


void CAlnWriter::AddGaps(....)
{
  ....
  switch(exon_chunk->Which()) {
  case CSpliced_exon_chunk::e_Match:
      interval_width = exon_chunk->GetMatch();
  case CSpliced_exon_chunk::e_Mismatch:
      interval_width = exon_chunk->GetMismatch();
  case CSpliced_exon_chunk::e_Diag:
      interval_width = exon_chunk->GetDiag();
      genomic_string.append(....);
      product_string.append(....);
      genomic_pos += interval_width;
      product_pos += interval_width/res_width;
      break;
    ....
  }
  ....
}

LLVM/Clang

V519 [CWE-563] The 'NType' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1663, 1664. MachOObjectFile.cpp 1664


Error MachOObjectFile::checkSymbolTable() const {
  ....
  } else {
    MachO::nlist STE = getSymbolTableEntry(SymDRI);
    NType = STE.n_type;
    NType = STE.n_type;
    NSect = STE.n_sect;
    NDesc = STE.n_desc;
    NStrx = STE.n_strx;
    NValue = STE.n_value;
  }
  ....
}

LLVM/Clang

V519 [CWE-563] The 'Alignment' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1158, 1160. LoadStoreVectorizer.cpp 1160


bool Vectorizer::vectorizeLoadChain(
    ArrayRef<Instruction *> Chain,
    SmallPtrSet<Instruction *, 16> *InstructionsProcessed) {
  ....
  unsigned Alignment = getAlignment(L0);
  ....
  unsigned NewAlign = getOrEnforceKnownAlignment(L0->getPointerOperand(),
                                                 StackAdjustedAlignment,
                                                 DL, L0, nullptr, &DT);
  if (NewAlign != 0)
    Alignment = NewAlign;
  Alignment = NewAlign;
  ....
}

Similar errors can be found in some other places:

  • V519 [CWE-563] The 'Effects' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 152, 165. WebAssemblyRegStackify.cpp 165
  • V519 [CWE-563] The 'ExpectNoDerefChunk' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4970, 4973. SemaType.cpp 4973

LLVM/Clang

V519 [CWE-563] The 'B.NDesc' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1488, 1489. llvm-nm.cpp 1489


static void
dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
                          const std::string &ArchiveName = std::string(),
                          const std::string &ArchitectureName = std::string()) {
  ....
  B.Sym = BasicSymbolRef();
  B.SymFlags = SymbolRef::SF_Global | SymbolRef::SF_Undefined;
  B.NType = MachO::N_EXT | MachO::N_UNDF;
  B.NSect = 0;
  B.NDesc = 0;                                              // <=
  B.NDesc = 0;                                              // <=
  MachO::SET_LIBRARY_ORDINAL(B.NDesc, Entry.ordinal());
  ....
}

Similar errors can be found in some other places:

  • V519 [CWE-563] The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 59, 61. coff2yaml.cpp 61

Haiku Operation System

V519 The 'm_kindex1' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 40, 41. agg_trans_double_path.cpp 41


trans_double_path::trans_double_path() :
    m_kindex1(0.0),
    m_kindex2(0.0),
    m_base_length(0.0),
    m_base_height(1.0),
    m_status1(initial),
    m_status2(initial),
    m_preserve_x_scale(true)
{
}

void trans_double_path::reset()
{
    m_src_vertices1.remove_all();
    m_src_vertices2.remove_all();
    m_kindex1 = 0.0;
    m_kindex1 = 0.0;
    m_status1 = initial;
    m_status2 = initial;
}

Haiku Operation System

V519 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 199, 200. nvme_ctrlr.c 200


static void nvme_ctrlr_set_intel_supported_features(struct nvme_ctrlr *ctrlr)
{
  bool *supported_feature = ctrlr->feature_supported;

  supported_feature[NVME_INTEL_FEAT_MAX_LBA] = true;
  supported_feature[NVME_INTEL_FEAT_MAX_LBA] = true;
  supported_feature[NVME_INTEL_FEAT_NATIVE_MAX_LBA] = true;
  supported_feature[NVME_INTEL_FEAT_POWER_GOVERNOR_SETTING] = true;
  supported_feature[NVME_INTEL_FEAT_SMBUS_ADDRESS] = true;
  supported_feature[NVME_INTEL_FEAT_LED_PATTERN] = true;
  supported_feature[NVME_INTEL_FEAT_RESET_TIMED_WORKLOAD_COUNTERS] = true;
  supported_feature[NVME_INTEL_FEAT_LATENCY_TRACKING] = true;
}

Haiku Operation System

V519 The 'copiedPath[len]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 92, 93. kernel_emu.cpp 93


int
UserlandFS::KernelEmu::new_path(const char *path, char **copy)
{
  ....
  // append a dot, if desired
  if (appendDot) {
    copiedPath[len] = '.';
    copiedPath[len] = '\0';
  }
  ....
}

CMake

V519 The 'tagString' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 84, 86. cmCPackLog.cxx 86


oid cmCPackLog::Log(int tag, const char* file, int line, const char* msg,
                     size_t length)
{
  ....
  if (tag & LOG_OUTPUT) {
    output = true;
    display = true;
    if (needTagString) {
      if (!tagString.empty()) {
        tagString += ",";
      }
      tagString = "VERBOSE";
    }
  }
  if (tag & LOG_WARNING) {
    warning = true;
    display = true;
    if (needTagString) {
      if (!tagString.empty()) {
        tagString += ",";
      }
      tagString = "WARNING";
    }
  }
  ....
}

Similar errors can be found in some other places:

  • V519 The 'tagString' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 94, 96. cmCPackLog.cxx 96
  • V519 The 'tagString' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 104, 106. cmCPackLog.cxx 106
  • V519 The 'tagString' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 114, 116. cmCPackLog.cxx 116
  • And 1 additional diagnostic messages.

libarchive

V519 The 'aes->aes_set' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4052, 4054. archive_string.c 4054


int
archive_mstring_copy_utf8(struct archive_mstring *aes, const char *utf8)
{
  if (utf8 == NULL) {
    aes->aes_set = 0;            // <=
  }
  aes->aes_set = AES_SET_UTF8;   // <=
  ....
  return (int)strlen(utf8);
}

Similar errors can be found in some other places:

  • V519 The 'aes->aes_set' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4066, 4068. archive_string.c 4068

ROOT

V519 The 'Line[Cursor]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 352, 353. Editor.cpp 353


size_t find_last_non_alnum(const std::string &str,
                             std::string::size_type index = std::string::npos) {
  ....
  char tmp = Line.GetText()[Cursor];
  Line[Cursor] = Line[Cursor - 1];
  Line[Cursor] = tmp;
  ....
}

VVVVVV

V519 The 'background' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1367, 1373. Map.cpp 1373


void mapclass::loadlevel(....)
{
  ....

  case 4: //The Warpzone
    tmap = warplevel.loadlevel(rx, ry, game, obj);
    fillcontent(tmap);
    roomname = warplevel.roomname;
    tileset = 1;
    background = 3;                    // <=
    dwgfx.rcol = warplevel.rcol;
    dwgfx.backgrounddrawn = false;

    warpx = warplevel.warpx;
    warpy = warplevel.warpy;
    background = 5;                    // <=
    if (warpy) background = 4;
    if (warpx) background = 3;
    if (warpx && warpy) background = 5;
    break;

  ....
}

ArduPod

V519 There are identical sub-expressions to the left and to the right of the '-' operator: pow(t, 2) - pow(t, 2). AP_Utils.cpp 176


pointLeg* AP_Utils::traceLeg(uint8_t leg, float phi, float z,
  int resolution, uint8_t shape) {
  ....
  if(shape == ELLIPTIC) {
    ....
    float v = sqrt(pow(phi - legs[leg].phi, 2) + pow(z - legs[leg].z, 2));
    float u = sqrt(pow(phi - phi0, 2) + pow(z - z0, 2));
    float t = sqrt(pow(phi0 - legs[leg].phi, 2) + pow(z0 - legs[leg].z, 2));
    theta = acos((pow(t, 2) - pow(t, 2) - pow(v, 2))/(-2.0*t*u));
    ....
  }
  ....
}

GCC

V519 The 'new_node->merged_comdat' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 406, 409. cgraphclones.c 409


cgraph_node *
cgraph_node::create_clone (....)
{
  ....
  new_node->icf_merged = icf_merged;
  new_node->merged_comdat = merged_comdat;     // <=
  new_node->thunk = thunk;
  new_node->unit_id = unit_id;
  new_node->merged_comdat = merged_comdat;     // <=
  new_node->merged_extern_inline = merged_extern_inline;
  ....
}

GCC

V519 The 'vr1.set' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3448, 3449. tree-ssa-sccvn.c 3449


tree
vn_reference_lookup_pieces (....)
{
  struct vn_reference_s vr1;
  ....
  vr1.set = set;
  vr1.set = base_set;
  ....
}

Most likely this is what should be written here: vr1.set = set; vr1.base_set = base_set;


Newton Game Dynamics

V519 The 'tmp[i][2]' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 468, 469. dgCollisionConvexHull.cpp 469


bool dgCollisionConvexHull::Create (dgInt32 count,....)
{
  ....
  dgStack<dgVector> tmp(3 * count);
  for (dgInt32 i = 0; i < count; i ++)
  {
    tmp[i][0] = dgFloat32 (buffer[i*3 + 0]);
    tmp[i][1] = dgFloat32 (buffer[i*3 + 1]);
    tmp[i][2] = dgFloat32 (buffer[i*3 + 2]);
    tmp[i][2] = dgFloat32 (0.0f);
  }
  ....
}

Command & Conquer

V519 The 'ScoresPresent' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 539, 541. INIT.CPP 541


bool Init_Game(int , char *[])
{
  ....
  ScoresPresent = false;
//if (CCFileClass("SCORES.MIX").Is_Available()) {
    ScoresPresent = true;
    if (!ScoreMix) {
      ScoreMix = new MixFileClass("SCORES.MIX");
      ThemeClass::Scan();
    }
//}

Minetest

V519 The 'color_name' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 621, 627. string.cpp 627


static bool parseNamedColorString(const std::string &value,
                                  video::SColor &color)
{
  std::string color_name;
  std::string alpha_string;

  size_t alpha_pos = value.find('#');
  if (alpha_pos != std::string::npos) {
    color_name = value.substr(0, alpha_pos);
    alpha_string = value.substr(alpha_pos + 1);
  } else {
    color_name = value;
  }

  color_name = lowercase(value); // <=

  std::map<const std::string, unsigned>::const_iterator it;
  it = named_colors.colors.find(color_name);
  if (it == named_colors.colors.end())
    return false;
  ....
}

Most likely color_name is overriten with unintentional value. Correct code: color_name = lowercase(value).


Amnesia: The Dark Descent

V519 The 'mfRollSpeedMul' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 298, 308. LuxPlayer.cpp 308


class cLuxPlayer : ....
{
  ....
private:
  ....
  float mfRoll;
  float mfRollGoal;
  float mfRollSpeedMul;
  float mfRollMaxSpeed;

  float mfLeanRoll;
  float mfLeanRollGoal;
  float mfLeanRollSpeedMul;
  float mfLeanRollMaxSpeed;

  cVector3f mvCamAnimPos;
  cVector3f mvCamAnimPosGoal;
  float mfCamAnimPosSpeedMul;
  float mfCamAnimPosMaxSpeed;
  ....
}

void cLuxPlayer::Reset()
{
  ....
  mfRoll=0;
  mfRollGoal=0;
  mfRollSpeedMul=0; // <=
  mfRollMaxSpeed=0; // <=

  mfLeanRoll=0;
  mfLeanRollGoal=0;
  mfLeanRollSpeedMul=0;
  mfLeanRollMaxSpeed=0;

  mvCamAnimPos =0;
  mvCamAnimPosGoal=0;
  mfRollSpeedMul=0; // <=
  mfRollMaxSpeed=0; // <=
  ....
}

Amnesia: The Dark Descent

V519 The 'mfTimePos' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 49, 53. AnimationState.cpp 53


cAnimationState::cAnimationState(....)
{
  ....
  mfTimePos = 0;
  mfWeight = 1;
  mfSpeed = 1.0f;
  mfBaseSpeed = 1.0f;
  mfTimePos = 0;
  mfPrevTimePos=0;
  ....
}


class cAnimationState
{
  ....
private:
  ....
  //Properties of the animation
  float mfLength;
  float mfWeight;
  float mfSpeed;
  float mfTimePos;
  float mfPrevTimePos;
  ....
}

Espressif IoT Development Framework

V519 The 'usRegCount' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 186, 187. mbfuncholding.c 187


eMBException
eMBFuncReadHoldingRegister( UCHAR * pucFrame, USHORT * usLen )
{
  ....
  USHORT          usRegCount;
  ....
  usRegCount = ( USHORT )( pucFrame[MB_PDU_FUNC_READ_REGCNT_OFF] << 8 );
  usRegCount = ( USHORT )( pucFrame[MB_PDU_FUNC_READ_REGCNT_OFF + 1] );
  ....
}

Espressif IoT Development Framework

V519 The '* pad_num' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 46, 48. touch_sensor_hal.c 48


void touch_hal_get_wakeup_status(touch_pad_t *pad_num)
{
  uint32_t touch_mask = 0;
  touch_ll_read_trigger_status_mask(&touch_mask);
  if (touch_mask == 0) {
    *pad_num = -1;
  }
  *pad_num = (touch_pad_t)(__builtin_ffs(touch_mask) - 1);
}

GTK

V519 [CWE-563] The 'priv->has_secondary_text' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 263, 265. gtkmessagedialog.c 265


static void
gtk_message_dialog_init (GtkMessageDialog *dialog)
{
  GtkMessageDialogPrivate *priv = ....;
  ....
  priv->has_primary_markup = FALSE;
  priv->has_secondary_text = FALSE;
  priv->has_primary_markup = FALSE;
  priv->has_secondary_text = FALSE;
  ....
}

Similar errors can be found in some other places:

  • V519 [CWE-563] The 'self->state' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2851, 2855. gdkevents.c 2855
  • V519 [CWE-563] The 'display->width' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2635, 2640. gtktextlayout.c 2640

Qt

V519 [CWE-563] The 'm_namespaceUri' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2295, 2298. qxmlstream.cpp 2298


QXmlStreamAttribute::QXmlStreamAttribute(const QString &namespaceUri,
                                         const QString &name,
                                         const QString &value)
{
    m_namespaceUri = namespaceUri;
    m_name = m_qualifiedName = name;
    m_value = value;
    m_namespaceUri = namespaceUri;
}

Qt

V519 [CWE-563] The 'done' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 509, 511. qeffects.cpp 511


void QRollEffect::scroll()
{
  ....
  if (currentHeight != totalHeight) {
      currentHeight = totalHeight * (elapsed/duration)
          + (2 * totalHeight * (elapsed%duration) + duration)
          / (2 * duration);
      // equiv. to int((totalHeight*elapsed) / duration + 0.5)
      done = (currentHeight >= totalHeight);
  }
  done = (currentHeight >= totalHeight) &&
         (currentWidth >= totalWidth);
  ....
}

Qt

V519 [CWE-563] The 'writeTo->animT' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1766, 1771. qquickimageparticle.cpp 1771


void QQuickImageParticle::initialize(int gIdx, int pIdx)
{
  ....
  } else {
    ImageMaterialData *state = getState(m_material);
    QQuickParticleData* writeTo = getShadowDatum(datum);
    writeTo->animT = datum->t;                               // <=
    writeTo->frameCount = 1;
    writeTo->frameDuration = 60000000.0;
    writeTo->frameAt = -1;
    writeTo->animIdx = 0;
    writeTo->animT = 0;                                      // <=
    writeTo->animX = writeTo->animY = 0;
    writeTo->animWidth = state->animSheetSize.width();
    writeTo->animHeight = state->animSheetSize.height();
  }
  ....
}

Qt

V519 [CWE-563] The 'qualifiedName' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1227, 1228. node.cpp 1228


QString Node::qualifyQmlName()
{
  QString qualifiedName = m_name;
  if (m_name.startsWith(QLatin1String("QML:")))
    qualifiedName = m_name.mid(4);
  qualifiedName = logicalModuleName() + "::" + m_name;
  return qualifiedName;
}

Most likely this is what should be written here: qualifiedName = logicalModuleName() + "::" + qualifiedName;


Qt

V519 [CWE-563] The 'lastNamespaceDeclaration' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3030, 3036. qxmlstream.cpp 3036


bool QXmlStreamWriterPrivate::finishStartElement(bool contents)
{
  ....
  if (inEmptyElement) {
    ....
    lastNamespaceDeclaration = tag.namespaceDeclarationsSize;   // <=
    lastWasStartElement = false;
  } else {
    write(">");
  }
  inStartElement = inEmptyElement = false;
  lastNamespaceDeclaration = namespaceDeclarations.size();      // <=
  return hadSomethingWritten;
}

Similar errors can be found in some other places:

  • V519 [CWE-563] The 'last' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 609, 637. qtextengine.cpp 637
  • V519 [CWE-563] The 'm_dirty' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1014, 1017. qquickshadereffect.cpp 1017
  • V519 [CWE-563] The 'changed' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 122, 128. qsgdefaultspritenode.cpp 128
  • And 1 additional diagnostic messages.

MuseScore

V519 The 'savedExtension.status' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 349, 352. extensionsservice.cpp 352


void ExtensionsService::th_refreshExtensions()
{
  ....
  if (savedExtension.version < extension.version) {
      savedExtension.status = ExtensionStatus::NeedUpdate;
  }

  savedExtension.status = ExtensionStatus::Installed;
  ....
}

MuseScore

V519 The 'bt' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 417, 418. chordrest.cpp 418


Element* ChordRest::drop(EditData& data)
{
  ....
  Fraction bt = tick() + actualTicks();
  bt = tick() + actualTicks();
  ....
}

Similar errors can be found in some other places:

  • V519 The 'lyrNote' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 962, 972. importgtp-gp6.cpp 972
  • V519 The '_crossMeasure' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2545, 2550. chord.cpp 2550

Snort

V519 The 'port_array[5061 / 8]' variable is assigned values twice successively. Perhaps this is a mistake. sip_config.c 328


#define PORT_INDEX(port) port / 8
#define SIP_PORT 5060
#define SIPS_PORT 5061

static void SIP_ParsePortList(char **ptr, uint8_t *port_array)
{
  ....
  /* If the user specified ports, remove SIP_PORT for now since
   * it now needs to be set explicitly. */
  port_array[PORT_INDEX(SIP_PORT)] = 0;
  port_array[PORT_INDEX(SIPS_PORT)] = 0;
  ....
}

Darwin-XNU

V519 The 'uh->uh_sport' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 4866, 4870. ipsec.c 4870


__private_extern__ boolean_t
ipsec_send_natt_keepalive(....)
{
  ....
  struct udphdr *uh = (__typeof__(uh))(void *)(  (char *)m_mtod(m)
                                                + sizeof(*ip));
  ....
  if (....)
  {
    uh->uh_sport = (u_short)sav->natt_encapsulated_src_port;
  } else {
    uh->uh_sport = htons((u_short)esp_udp_encap_port);
  }
  uh->uh_sport = htons((u_short)esp_udp_encap_port);
  ....
}

Storm Engine

V519 The 'h' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 385, 389. Sharks.cpp 389


inline void Sharks::Shark::IslandCollision(....)
{
  if (h < 1.0f)
  {
    h -= 100.0f / 150.0f;
    if (h > 0.0f)
    {
      h *= 150.0f / 50.0f;
    }
    else
      h = 0.0f;
    h = 0.0f;
    vx -= x * (1.0f - h);
    vz -= z * (1.0f - h);
}

LFortran

V519 [CWE-563] The 'tmp' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 761, 764. asr_to_llvm.cpp 764


void visit_DerivedRef(const ASR::DerivedRef_t& x) {
  ....
  llvm::Value* tmp1 = builder->CreateGEP(tmp, idx_vec);
  if( member->m_type->type == ASR::ttypeType::Derived ) {
    ASR::Derived_t* der = (ASR::Derived_t*)(&(member->m_type->base));
    ASR::DerivedType_t* der_type = ....;
    der_type_name = std::string(der_type->m_name);
    uint32_t h = get_hash((ASR::asr_t*)member);
    if( llvm_symtab.find(h) != llvm_symtab.end() ) {
      tmp = llvm_symtab[h];       // <=
    }
  }
  tmp = tmp1;                     // <=
}

libtorrent

V519 The 's.dht_torrents' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 205, 210. dht_tracker.cpp 210.


void dht_tracker::dht_status(session_status& s)
{
  s.dht_torrents += int(m_storage.num_torrents());    // <=

  s.dht_nodes = 0;
  s.dht_node_cache = 0;
  s.dht_global_nodes = 0;
  s.dht_torrents = 0;                                 // <=
  s.active_requests.clear();
  s.dht_total_allocations = 0;

  for (auto& n : m_nodes)
    n.second.dht.status(s);
}

LLVM/Clang

V519 [CWE-563, CERT-MSC13-C] The 'Value.uval' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 334, 335. DWARFFormValue.cpp 335


....
uint64_t uval;
....
bool DWARFFormValue::extractValue(const DWARFDataExtractor &Data,
                                  uint64_t *OffsetPtr, dwarf::FormParams FP,
                                  const DWARFContext *Ctx,
                                  const DWARFUnit *CU) {
  ....
  case DW_FORM_LLVM_addrx_offset:
    Value.uval = Data.getULEB128(OffsetPtr, &Err) << 32;
    Value.uval = Data.getU32(OffsetPtr, &Err);
    break;
  ....
}

Protocol Buffers

V519 [CWE-563] The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 163, 164. java_primitive_field_lite.cc 164


void SetPrimitiveVariables(....) {
  ....
  if (HasHasbit(descriptor)) {
    (*variables)["get_has_field_bit_message"] = ....;
    (*variables)["set_has_field_bit_message"] = ....;
    (*variables)["clear_has_field_bit_message"] = ....;
    ....
  } else {
    (*variables)["set_has_field_bit_message"] = "";      // <=
    (*variables)["set_has_field_bit_message"] = "";      // <=
    (*variables)["clear_has_field_bit_message"] = "";
  ....
}

RPCS3

V519 The 'evnt->color.white_x' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 51, 52. sys_uart.cpp 52


struct av_get_monitor_info_cmd : public ps3av_cmd
{
  bool execute(....) override
  {
    // ....
    evnt->color.blue_x = 0xFFFF;
    evnt->color.blue_y = 0xFFFF;
    evnt->color.green_x = 0xFFFF;
    evnt->color.green_y = 0xFFFF;
    evnt->color.red_x = 0xFFFF;
    evnt->color.red_y = 0xFFFF;
    evnt->color.white_x = 0xFFFF;
    evnt->color.white_x = 0xFFFF;
    evnt->color.gamma = 100;
    // ....
  {
};

GPCS4

V519 [CWE-563] The '* memoryType' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 54, 55. sce_kernel_memory.cpp 55


int PS4API sceKernelGetDirectMemoryType(...., int *memoryType, ....)
{
  LOG_SCE_DUMMY_IMPL();
  *memoryType = SCE_KERNEL_WB_GARLIC;
  *memoryType = SCE_KERNEL_WC_GARLIC;
  return SCE_OK;
}

LLVM/Clang

V519 [CWE-563, CERT-MSC13-C] The 'offset' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 6888, 6890. ObjectFileMachO.cpp 6890


ObjectFileMachO::MachOCorefileAllImageInfos
ObjectFileMachO::GetCorefileAllImageInfos() {
  ....
  lldb::offset_t offset = MachHeaderSizeFromMagic(m_header.magic);
  ....
  uint32_t imgcount = m_data.GetU32(&offset);
  uint64_t entries_fileoff = m_data.GetU64(&offset);
  offset += 4; // uint32_t entries_size;
  offset += 4; // uint32_t unused;

  offset = entries_fileoff;
  ....
}

LLVM/Clang

V519 [CWE-563, CERT-MSC13-C] The 'Context.ss' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 110, 112. RegisterContextMinidumpTest.cpp 112


TEST(RegisterContextMinidump, ConvertMinidumpContext_x86_64) {
  MinidumpContext_x86_64 Context;
  ....
  Context.rax = 0x0001020304050607;
  Context.rbx = 0x08090a0b0c0d0e0f;
  ....
  Context.eflags = 0x88898a8b;
  Context.cs = 0x8c8d;
  Context.fs = 0x8e8f;
  Context.gs = 0x9091;
  Context.ss = 0x9293;    // <=
  Context.ds = 0x9495;
  Context.ss = 0x9697;    // <=
  llvm::ArrayRef<uint8_t> ContextRef(reinterpret_cast<uint8_t *>(&Context),
                                     sizeof(Context));
  ....
}

LLVM/Clang

V519 [CWE-563, CERT-MSC13-C] The 'dqo_target_queue' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 174, 175. SystemRuntimeMacOSX.h 175


LibdispatchOffsets() {
  dqo_version = UINT16_MAX;
  dqo_flags = UINT16_MAX;
  dqo_serialnum = UINT16_MAX;
  dqo_label = UINT16_MAX;
  dqo_width = UINT16_MAX;
  dqo_running = UINT16_MAX;
  dqo_suspend_cnt = UINT16_MAX;
  dqo_target_queue = UINT16_MAX;     // <=
  dqo_target_queue = UINT16_MAX;     // <=
  dqo_priority = UINT16_MAX;
  dqo_label_size = 0;
  dqo_flags_size = 0;
  dqo_serialnum_size = 0;
  dqo_width_size = 0;
  dqo_running_size = 0;
  dqo_suspend_cnt_size = 0;
  dqo_target_queue_size = 0;
  dqo_priority_size = 0;
}

VCMI

V519 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1203, 1204. CGameState.cpp 1204


CGameState::CrossoverHeroesList
CGameState::getCrossoverHeroesFromPreviousScenarios()
  const
{
  ....
  crossoverHeroes.heroesFromAnyPreviousScenarios =
  crossoverHeroes.heroesFromPreviousScenario = heroes;
  crossoverHeroes.heroesFromPreviousScenario = heroes;
  ....
}

GTK

V519 [CWE-563, CERT-MSC13-C] The '* out_start' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 67, 71. gtksectionmodel.c 71


static void
gtk_section_model_default_get_section (GtkSectionModel *self,
                                       guint            position,
                                       guint           *out_start,
                                       guint           *out_end)
{
  guint n_items = g_list_model_get_n_items (G_LIST_MODEL (self));

  if (position >= n_items)
    {
      *out_start = n_items;
      *out_end = G_MAXUINT;
    }

  *out_start = 0;
  *out_end = n_items;
}

Similar errors can be found in some other places:

  • V519 [CWE-563, CERT-MSC13-C] The '* out_end' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 68, 72. gtksectionmodel.c 72

GZDoom

V519 The 'c' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 475, 476. pcxtexture.cpp 476


int FPCXTexture::CopyPixels(FBitmap *bmp, int conversion, int frame)
{
  ....
  uint8_t c = lump.ReadUInt8();
  c = 0x0c;  // Apparently there's many non-compliant PCXs out there...
  if (c != 0x0c)
  {
    for(int i=0;i<256;i++) pe[i]=PalEntry(255,i,i,i);// default to a gray map
  }
  ....
}

Similar errors can be found in some other places:

  • V519 The 'dg.mIndexIndex' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 820, 829. v_2ddrawer.cpp 829, 72. gtksectionmodel.c 72
  • V519 The 'dg.mTexture' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 885, 887. v_2ddrawer.cpp 887
  • V519 The 'LastChar' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 226, 228. singlelumpfont.cpp 228
  • And 4 additional diagnostic messages.

iSulad

V519 [CWE-563, CERT-MSC13-C] The 'response->result->page_size' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2279, 2280. image.c 2280


static int append_result_to_response(....)
{
  ....
  response->result->num_pages = result->num_pages;
  response->result->num_results = result->num_results;
  response->result->page = result->page;
  response->result->page_size = result->page_size;
  response->result->page_size = result->page_size;
  response->result->query = util_strdup_s(result->query);
  ....
}

ReactOS

V519 The '* pcchValue' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1779, 1782. msi.c 1782


UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
                               LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext,
                               LPCWSTR szProperty, LPWSTR lpValue,
                               DWORD *pcchValue)
{
  ....
  if ((*val && *pcchValue < len + 1) || !lpValue)
  {
    if (lpValue)
      r = ERROR_MORE_DATA;
    *pcchValue = len * sizeof(WCHAR);
  }
  *pcchValue = len;
  ....
}

ReactOS

V519 The 'Status' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1254, 1255. cabinet.c 1255


ULONG
CabinetExtractFile(IN PCABINET_CONTEXT CabinetContext,
                   IN PCAB_SEARCH Search)
{
  ....
  if (Status != CS_SUCCESS)
  {
    DPRINT("Cannot uncompress block\n");
    if (Status == CS_NOMEMORY)
      Status = CAB_STATUS_NOMEMORY;
    Status = CAB_STATUS_INVALID_CAB;
    goto UnmapDestFile;
  }
  ....
}

DPDK

V519 The 'dev_conf->nb_event_port_enqueue_depth' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1166, 1168. test_event_crypto_adapter.c 1168


struct rte_event_dev_config {
  uint32_t dequeue_timeout_ns;              // Ok
  int32_t nb_events_limit;                  // Ok
  uint8_t nb_event_queues;                  // Ok
  uint8_t nb_event_ports;                   // Ok
  uint32_t nb_event_queue_flows;            // Ok
  uint32_t nb_event_port_dequeue_depth;     // Ok
  uint32_t nb_event_port_enqueue_depth;     // Double assignment
  uint32_t event_dev_cfg;                   //
  uint8_t nb_single_link_event_port_queues; //
};

static inline void
evdev_set_conf_values(struct rte_event_dev_config *dev_conf,
      struct rte_event_dev_info *info)
{
  memset(dev_conf, 0, sizeof(struct rte_event_dev_config));
  dev_conf->dequeue_timeout_ns = info->min_dequeue_timeout_ns;
  dev_conf->nb_event_ports = NB_TEST_PORTS;
  dev_conf->nb_event_queues = NB_TEST_QUEUES;
  dev_conf->nb_event_queue_flows = info->max_event_queue_flows;
  dev_conf->nb_event_port_dequeue_depth = info->max_event_port_dequeue_depth;
  dev_conf->nb_event_port_enqueue_depth = info->max_event_port_enqueue_depth;
  dev_conf->nb_event_port_enqueue_depth = info->max_event_port_enqueue_depth;
  dev_conf->nb_events_limit = info->max_num_events;
}

Similar errors can be found in some other places:

  • V519 The 'dev_conf->nb_event_port_enqueue_depth' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 414, 416. test_event_dma_adapter.c 416
  • V519 The 'dev_conf->nb_event_port_enqueue_depth' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 83, 85. test_event_timer_adapter.c 85
  • V519 The 'dev_conf->nb_event_port_enqueue_depth' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 112, 114. test_eventdev.c 114
  • And 5 additional diagnostic messages.

DPDK

V519 The 'mac->type' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 297, 302. e1000_api.c 302


s32 e1000_set_mac_type(struct e1000_hw *hw)
{
  ....
  switch (hw->device_id) {
  ....
  case E1000_DEV_ID_PCH_ADL_I219_LM16:
  case E1000_DEV_ID_PCH_ADL_I219_V16:
  case E1000_DEV_ID_PCH_RPL_I219_LM23:
  case E1000_DEV_ID_PCH_RPL_I219_V23:
    mac->type = e1000_pch_tgp;           // <=
  case E1000_DEV_ID_PCH_ADL_I219_LM17:
  case E1000_DEV_ID_PCH_ADL_I219_V17:
  case E1000_DEV_ID_PCH_RPL_I219_LM22:
  case E1000_DEV_ID_PCH_RPL_I219_V22:
    mac->type = e1000_pch_adp;           // <=
    break;
  case E1000_DEV_ID_82575EB_COPPER:
  case E1000_DEV_ID_82575EB_FIBER_SERDES:
  case E1000_DEV_ID_82575GB_QUAD_COPPER:
    mac->type = e1000_82575;
    break;
  ....
  }
  ....
}

DPDK

V519 The 'bp->rss_conf.rss_hf' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2322, 2325. bnxt_ethdev.c 2325


static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
           struct rte_eth_rss_conf *rss_conf)
{
  ....
  /* Cache the hash function */
  bp->rss_conf.rss_hf = rss_conf->rss_hf;

  /* Cache the hash function */
  bp->rss_conf.rss_hf = rss_conf->rss_hf;
  ....
}

DPDK

V519 The 'data' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 211, 213. cnxk_eswitch_rxtx.c 213


uint16_t
cnxk_eswitch_dev_tx_burst(....)
{
  ....
  uint64_t aura_handle, data = 0;
  ....
  for (pkt = 0; pkt < nb_tx; pkt++) {
    ....
    data &= ~0x7ULL;
    /*<15:12> = CNTM1: Count minus one of LMTSTs in the burst */
    data = (0ULL << 12);
    /* *<10:0> = LMT_ID: Identifies which LMT line is used for the first LMTST
    */
    data |= (uint64_t)lmt_id;
    ....
  }
  ....
}

DPDK

V519 The 'bdp' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 417, 418. enet_ethdev.c 418


static int
enetfec_tx_queue_setup(struct rte_eth_dev *dev,
      uint16_t queue_idx,
      uint16_t nb_desc,
      unsigned int socket_id __rte_unused,
      const struct rte_eth_txconf *tx_conf)
{
  ....
  struct bufdesc *bdp, *bd_base;
  ....
  bdp = txq->bd.base;
  bdp = txq->bd.cur;
  ....
}

DPDK

V519 The 'fi->lan_en' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3930, 3932. ice_switch.c 3932


static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
{
  if ((fi->flag & ICE_FLTR_RX) &&
      (fi->fltr_act == ICE_FWD_TO_VSI ||
       fi->fltr_act == ICE_FWD_TO_VSI_LIST) &&
      fi->lkup_type == ICE_SW_LKUP_LAST)
    fi->lan_en = true;
  fi->lb_en = false;
  fi->lan_en = false;
  ....
}

DPDK

V519 The 'info->mtu' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2607, 2609. ecore_mcp.c 2609


enum _ecore_status_t ecore_mcp_fill_shmem_func_info(struct ecore_hwfn *p_hwfn,
                struct ecore_ptt *p_ptt)
{
  ....
  info->mtu = (u16)shmem_info.mtu_size;

  if (info->mtu == 0)
    info->mtu = 1500;

  info->mtu = (u16)shmem_info.mtu_size;
  ....
}

DPDK

V519 The 'link->link_autoneg' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 250, 253. otx_ep_mbox.c 253


int otx_ep_mbox_get_link_info(struct rte_eth_dev *eth_dev,
            struct rte_eth_link *link)
{
  ....
  link->link_status = RTE_ETH_LINK_UP;
  link->link_duplex = RTE_ETH_LINK_FULL_DUPLEX;
  link->link_autoneg = (link_info.autoneg ==
            OTX_EP_LINK_AUTONEG) ? RTE_ETH_LINK_AUTONEG : RTE_ETH_LINK_FIXED;

  link->link_autoneg = link_info.autoneg;
  link->link_speed = link_info.speed;
  return 0;
}

DPDK

V519 The 'p->mp_fld_rst_ptp' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 61, 62. nthw_fpga_rst9563.c 62


static int nthw_fpga_rst9563_setup(nthw_fpga_t *p_fpga,
                                   struct nthw_fpga_rst_nt200a0x *const p)
{
  ....
  p->mp_fld_rst_ptp = nthw_register_get_field(p_curr_reg, RST9563_RST_PTP);
  p->mp_fld_rst_ptp = nthw_register_get_field(p_curr_reg, RST9563_RST_PTP);
  ....
}

DPDK

V519 The 'can_push' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 118, 128. virtio_rxtx_packed.h 128


static inline int
virtqueue_enqueue_single_packed_vec(struct virtnet_tx *txvq,
            struct rte_mbuf *txm)
{
  struct virtqueue *vq = virtnet_txq_to_vq(txvq);
  struct virtio_hw *hw = vq->hw;
  uint16_t hdr_size = hw->vtnet_hdr_size;
  uint16_t slots, can_push = 0, use_indirect = 0;
  int16_t need;

  /* optimize ring usage */
  if ((virtio_with_feature(hw, VIRTIO_F_ANY_LAYOUT) ||
       virtio_with_feature(hw, VIRTIO_F_VERSION_1)) &&
       rte_mbuf_refcnt_read(txm) == 1 && RTE_MBUF_DIRECT(txm) &&
       txm->nb_segs == 1 && rte_pktmbuf_headroom(txm) >= hdr_size)
    can_push = 1;
  else if (virtio_with_feature(hw, VIRTIO_RING_F_INDIRECT_DESC) &&
     txm->nb_segs < VIRTIO_MAX_TX_INDIRECT)
    use_indirect = 1;

  /* How many main ring entries are needed to this Tx?
   * indirect   => 1
   * any_layout => number of segments
   * default    => number of segments + 1
   */
  can_push = rte_mbuf_refcnt_read(txm) == 1 &&
       RTE_MBUF_DIRECT(txm) &&
       txm->nb_segs == 1 &&
       rte_pktmbuf_headroom(txm) >= hdr_size;
  ....
}

DPDK

V519 The 'skeldev->num_queues' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 92, 97. skeleton_rawdev.c 97


static int skeleton_rawdev_configure(const struct rte_rawdev *dev,
             rte_rawdev_obj_t config,
             size_t config_size)
{
  ....
  skeldev = skeleton_rawdev_get_priv(dev);

  if (skeldev_conf->num_queues <= SKELETON_MAX_QUEUES)
    skeldev->num_queues = skeldev_conf->num_queues;
  else
    return -EINVAL;

  skeldev->capabilities = skeldev_conf->capabilities;
  skeldev->num_queues = skeldev_conf->num_queues;

  return 0;
}

DPDK

V519 The 'ev->event' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 662, 669. rte_event_dma_adapter.c 669


static inline uint16_t
edma_ops_enqueue_burst(....)
{
  ....
  num = RTE_MIN(num, DMA_BATCH_SIZE);
  for (i = 0; i < num; i++) {
    struct rte_event *ev = &events[nb_ev++];

    ev->event = ops[i]->impl_opaque[0];
    ev->event_ptr = ops[i];
    ev->event_type = RTE_EVENT_TYPE_DMADEV;
    if (adapter->implicit_release_disabled)
      ev->op = RTE_EVENT_OP_FORWARD;
    else
      ev->op = RTE_EVENT_OP_NEW;
    ev->event = ops[i]->event_meta;
  }
  ....
}

Similar errors can be found in some other places:

  • V519 The 'nb_tx' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 199, 205. rte_port_sched.c 205