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;
We use cookies for the analysis of events to improve our content and make user interaction more convenient. By continuing the view of our web-pages you accept the terms of using these files. You can find out more about cookie-files and privacy policy or close the notification, by clicking on the button. Learn More →
Do not show