Bewerken

Delen via


C28171

warning C28171: The function has more than one instance of PAGED_CODE or PAGED_CODE_LOCKED

This warning indicates that there is more than one instance of the PAGED_CODE or PAGED_CODE_LOCKED macro in a function. This error is reported at the second or subsequent instances of the PAGED_CODE or PAGED_CODE_LOCKED macro.

Functions in a paged section must have exactly one instance of the PAGED_CODE or PAGED_CODE_LOCKED macro and the macro should appear at the beginning of the function between the first brace ({) and the first conditional statement, and after any declarations.

PREfast for Drivers uses these macros when #pragma alloc_text or #pragma code_seg is used to move a function into a pageable code section. The Code Analysis tool infers that a section is pageable when the section name begins with PAGE. For more information, see Warning C28170.