OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Static analysis annotation macros

Wrappers for Microsoft's SAL annotations and othersUse of these is optional, but recommended particularly for C APIs, as well as any methods handling a buffer with a length. More...

Macros

#define OSVR_RETURN_SUCCESS_CONDITION(X)
 Applied to a typedef, indicates the condition for return under which a function returning it should be considered to have succeeded (thus holding certain specifications). More...
 

Function annotations

These indicate particular relevant aspects about a function. Some duplicate the effective meaning of parameter annotations: applying both allows the fullest extent of static analysis tools to analyze the code, and in some compilers, generate warnings.

#define OSVR_RETURN_WARN_UNUSED
 Indicates the function has a return value that must be used (either a security problem or an obvious bug if not). More...
 

Detailed Description

Wrappers for Microsoft's SAL annotations and others

Use of these is optional, but recommended particularly for C APIs, as well as any methods handling a buffer with a length.

Macro Definition Documentation

#define OSVR_RETURN_WARN_UNUSED

#include <osvr/Util/AnnotationMacrosC.h>

Indicates the function has a return value that must be used (either a security problem or an obvious bug if not).

Should be placed before the return value (and virtual keyword, if applicable) in both declaration and definition.

Definition at line 213 of file AnnotationMacrosC.h.

#define OSVR_RETURN_SUCCESS_CONDITION (   X)

#include <osvr/Util/AnnotationMacrosC.h>

Applied to a typedef, indicates the condition for return under which a function returning it should be considered to have succeeded (thus holding certain specifications).

Should be placed before the typename in a typedef, with the parameter including the keyword return to substitute for the return value.

Definition at line 227 of file AnnotationMacrosC.h.