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 haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
>
Examples of errors detected by the V627…

Examples of errors detected by the V627 diagnostic

V627. Argument of sizeof() is a macro, which expands to a number. Consider inspecting the expression.


Samba

V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. regfio.c 1470


#define HBIN_HDR_SIZE    4

char header[HBIN_HDR_SIZE];

static REGF_HBIN* regf_hbin_allocate(REGF_FILE *file,
                                     uint32 block_size)
{
  REGF_HBIN *hbin;
  ....
  memcpy( hbin->header, "hbin", sizeof(HBIN_HDR_SIZE) );
  ....
}

It works. Good luck: sizeof(4) == 4.


Network Security Services (NSS)

V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. ssl3ext.c 1541


#define SSL3_MASTER_SECRET_LENGTH 48

SECStatus
ssl3_ServerHandleSessionTicketXtn(....)
{
  if (buffer_len < sizeof(SSL3_MASTER_SECRET_LENGTH))
    goto no_ticket;
  ....
}

Data Distribution Service

V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. test_position_independent_malloc.cpp 61


static void *
initialize (TEST_MALLOC *allocator)
{
  ....
  ACE_ALLOCATOR_RETURN (gap,
                        allocator->malloc (sizeof (256)),
                        0);
  ....
}

Similar errors can be found in some other places:

  • V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. malloc_test.cpp 168

WebRTC

V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. fsmdef.c 4481


#define CC_MAX_DIALSTRING_LEN (512)

static sm_rcs_t
fsmdef_ev_idle_feature (sm_event_t *event)
{
  ....
  memset(data->newcall.redirect.redirects[0].number, 0,
         sizeof(CC_MAX_DIALSTRING_LEN));
  ....
}

Similar errors can be found in some other places:

  • V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. fsmdef.c 4508
  • V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. fsmxfr.c 800
  • V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. fsmxfr.c 1600

Haiku Operation System

V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. device.c 72


#define PCI_line_size 0x0c /* (1 byte) cache line size in 32 bit words */

static status_t
wb840_open(const char* name, uint32 flags, void** cookie)
{
  ....
  data->wb_cachesize = gPci->read_pci_config(data->pciInfo->bus,
    data->pciInfo->device, data->pciInfo->function, PCI_line_size,
    sizeof(PCI_line_size)) & 0xff;
  ....
}