Skip to content

Commit

Permalink
fix gcc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
VivianNK committed Sep 9, 2024
1 parent 65e9f60 commit 0f1e8bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class AdvancedLoggerWriteTestPei : public Test {
UINTN Instance;
CHAR8 *Buffer;
UINTN NumberOfBytes;
UINTN Instance;

void
SetUp (
Expand Down
24 changes: 15 additions & 9 deletions AdvLoggerPkg/Test/Mock/Include/GoogleTest/Ppi/MockAdvancedLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ struct MockAdvancedLoggerPpi {
IN UINTN NumberOfBytes)
);

MOCK_FUNCTION_DECLARATION (
VOID,
gAL_AdvancedLoggerPrintPpi,
(IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker)
);

MOCK_FUNCTION_DECLARATION (
VOID,
gAL_AdvancedLoggerAssertPpi,
Expand All @@ -51,9 +43,23 @@ struct MockAdvancedLoggerPpi {
//
MOCK_INTERFACE_DEFINITION (MockAdvancedLoggerPpi);
MOCK_FUNCTION_DEFINITION (MockAdvancedLoggerPpi, gAL_AdvancedLoggerWritePpi, 3, EFIAPI);
MOCK_FUNCTION_DEFINITION (MockAdvancedLoggerPpi, gAL_AdvancedLoggerPrintPpi, 3, EFIAPI);
// MOCK_FUNCTION_DEFINITION (MockAdvancedLoggerPpi, gAL_AdvancedLoggerPrintPpi, 3, EFIAPI);
MOCK_FUNCTION_DEFINITION (MockAdvancedLoggerPpi, gAL_AdvancedLoggerAssertPpi, 3, EFIAPI);

// Mock function definition for gAL_AdvancedLoggerPrintPpi to use C standard VA_LIST
extern "C" {
VOID
EFIAPI
gAL_AdvancedLoggerPrintPpi (
IN UINTN ErrorLevel,
IN CONST CHAR8 *Format,
IN VA_LIST VaListMarker
)
{
return;
}
}

ADVANCED_LOGGER_PPI advancedLoggerPpiInstance = {
ADVANCED_LOGGER_PPI_SIGNATURE, // UINT32
ADVANCED_LOGGER_PPI_VERSION, // UINT32
Expand Down

0 comments on commit 0f1e8bc

Please sign in to comment.