Examples of errors detected by the V1001 diagnostic.


V1001. The variable is assigned but is not used until the end of the function.


EFL Core Libraries

V1001 The 'address_shadow' variable is assigned but is not used until the end of the function. elocation.c 1122


static Elocation_Address *address = NULL;

EAPI Eina_Bool
elocation_address_get(Elocation_Address *address_shadow)
{
   if (!address) return EINA_FALSE;
   if (address == address_shadow) return EINA_TRUE;

   address_shadow = address;
   return EINA_TRUE;
}

Most likely this is what should be written here: *address_shadow = *address;

Similar errors can be found in some other places:

  • V1001 The 'screen' variable is assigned but is not used until the end of the function. ecore_x_xinerama.c 92
  • V1001 The 'ret' variable is assigned but is not used until the end of the function. edje_edit.c 12774
  • V1001 The 'ret' variable is assigned but is not used until the end of the function. edje_edit.c 15884
  • And 2 additional diagnostic messages.


Do you make errors in the code?

Check your code
with PVS-Studio

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

goto PVS-Studio;