Warning C28230

The type of parameter has no member.

This warning indicates that an argument to an annotation attempts to access a member of a struct, class, or union that doesn't exist. This warning will also be emitted if a parameter tries to call a member function of the object.

Example

#include <sal.h>

struct MyStruct
{
  //...
  int usefulMember;
};

// Oops, the name of the member is spelled wrong so it will not be found
void f(_Out_writes_(value.usefulmember) int *buffer, MyStruct value)
{
  for(int i = 0 ; i < value.usefulMember; i++)
  {
    buffer[i] = i;
    //...
  }
}

In this example, the spelling just needs to be corrected.

void f(_Out_writes_(value.usefulMember) int *buffer, MyStruct value)
{
  for(int i = 0 ; i < value.usefulMember; i++)
  {
    buffer[i] = i;
    //...
  }
}