Our website uses cookies to enhance your browsing experience.
Accept
to the top
close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you do not see the email in your inbox, please check if it is filtered to one of the following folders:

  • Promotion
  • Updates
  • Spam

Webinar: Evaluation - 05.12

>
>
>
Examples of errors detected by the V532…

Examples of errors detected by the V532 diagnostic

V532. Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'.


eMule Plus

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. emule customautocomplete.cpp 277


STDMETHODIMP CCustomAutoComplete::Next(...,
                                       ULONG *pceltFetched)
{
  ....
  if (pceltFetched != NULL)
    *pceltFetched++;
  ....
}

This is what should have been written here: (*pceltFetched)++;


FCEUX

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. fceux xstring.cpp 444


void splitpath(const char* path, char* drv, char* dir,
               char* name, char* ext)
{
  const char* end; /* end of processed string */
  const char* p;  /* search pointer */
  const char* s;  /* copy pointer */
  ....
  for(s=p; s<end; )
    *s++;
  ....
}

I cannot understand at all what the programmer wanted to do here. This code is equivalent to s = end.


IPP Samples

V532 Consider inspecting the statement of '*pointer--' pattern. Probably meant: '(*pointer)--'. aac_enc sbr_enc_frame_gen.c 428


static void
sbrencConflictResolution (..., Ipp32s *nLeftBord)
{
  ....
  *nLeftBord = nBordNext - 1;
  ....
  if (*lenBordNext > 1) {
    ....
    *nLeftBord--;
  }
  ....
}

nLeftBord is used to return the value. This is what should have been written here: (*nLeftBord)--;


IPP Samples

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. mpeg2_dec umc_mpeg2_dec.cpp 59


static IppStatus mp2_HuffmanTableInitAlloc(Ipp32s *tbl, ...)
{
  ....
  for (i = 0; i < num_tbl; i++) {
    *tbl++;
  }
  ....
}

Meaningless code. Currently it is equivalent to tbl += num_tbl.


Apache HTTP Server

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. apriconv iconv_uc.c 114


apr_status_t
iconv_uc_conv(..., apr_size_t *res)
{
  ....
  if (size)
    *res ++;
  ....
}

This is what should have been written here: (*res)++;


DeSmuME

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. DeSmuME_VS2005 xstring.cpp 479


void splitpath(const char* path, char* drv, char* dir,
               char* name, char* ext)
{
  ....
  for(s=p; s<end; )
    *s++;
  ....
}

Meaningless code. Currently it is equivalent to s = end.


OpenSSL

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. cpstringutils.cpp 2741


void SkipWhiteSpace(char **ioSrcCharPtr,
                    const Boolean inStopAtEOL)
{
  ....
  while ((**ioSrcCharPtr == ' ' || **ioSrcCharPtr == '\t') &&
         **ioSrcCharPtr != '\r' && **ioSrcCharPtr != '\n')
  {
    *ioSrcCharPtr++;
  }
  ....
  while (**ioSrcCharPtr == ' ' || **ioSrcCharPtr == '\t')
  {
    *ioSrcCharPtr++;
  }
  ....
}

Similar errors can be found in some other places:

  • V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. cpstringutils.cpp 2749

Miranda NG

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. NimContact namereplacing.cpp 92


int findLine(...., int *positionInOldString)
{
  ....
    *positionInOldString ++;
     return (linesInFile - 1);
  }
  ....
}

Godot Engine

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. trex.c 506


static const TRexChar *trex_matchnode(
  ...., const TRexChar *str, ....)
{
  ....
  case OP_DOT:
  {
    *str++;
  }
  return str;
  ....
}

Similar errors can be found in some other places:

  • V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. trex.c 512
  • V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. trex.c 518
  • V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. trex.c 524
  • And 1 additional diagnostic messages.

Open X-Ray Engine

V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. lwio.c 316


int sgetI1( unsigned char **bp )
{
  int i;

  if ( flen == FLEN_ERROR ) return 0;
  i = **bp;
  if ( i > 127 ) i -= 256;
  flen += 1;
  *bp++;
  return i;
}

Similar errors can be found in some other places:

  • V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. lwio.c 354
  • V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'. lwob.c 80