Examples of errors detected by the V647 diagnostic.


V647. The value of 'A' type is assigned to the pointer of 'B' type.


Tizen

V647 The value of 'int' type is assigned to the pointer of 'int' type. surveillance_test_suite.c 928


void person_recognized_cb(
  mv_surveillance_event_trigger_h handle,
  mv_source_h source,
  int video_stream_id,
  mv_surveillance_result_h event_result,
  void *user_data)
{
  ....
  int *labels = malloc(sizeof(int) * number_of_persons);
  ....
}

The thing that the malloc function has not been declared, so there is no #include <stdlib.h> anywhere. Details: https://www.viva64.com/en/a/0065/



Do you make errors in the code?

Check your code
with PVS-Studio

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

goto PVS-Studio;