C6510

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

warning C6510: Invalid annotation: 'NullTerminated' property may only be used on buffers whose elements are of integral or pointer type: Function '<function>' <parameter>.

This warning indicates an incorrect use of the NullTerminated property (those ending in '_z'). You can only use this type of property on pointer or array types.

Example

The following code generates this warning:

#include <sal.h>  
  
void f(_In_z_ char x)  
{  
    // code ...  
}  

To correct this warning, use the following code:

#include <sal.h>  
  
void f(_In_z_ char * x)  
{  
    // code ...  
}  

See Also

C6516