Changeset 4099129 in mainline


Ignore:
Timestamp:
2019-04-18T19:59:51Z (6 years ago)
Author:
Petr Pavlu <setup@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
739bc43
Parents:
1b1be5f
Message:

arm64: Use _Static_assert() for a compile-time check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm64/src/main.c

    r1b1be5f r4099129  
    191191
    192192        /* Statically check PAGE_SIZE and BOOT_OFFSET. */
    193 #if PAGE_SIZE != 4096
    194 #error Unsupported PAGE_SIZE
    195 #endif
    196 #if !IS_ALIGNED(BOOT_OFFSET, PAGE_SIZE)
    197 #error Unsupported BOOT_OFFSET
    198 #endif
     193        _Static_assert(PAGE_SIZE == 4096, "PAGE_SIZE must be equal to 4096");
     194        _Static_assert(IS_ALIGNED(BOOT_OFFSET, PAGE_SIZE),
     195            "BOOT_OFFSET must be a multiple of PAGE_SIZE");
     196
    199197        /*
    200198         * Dynamically check the memory base. The condition should be always
Note: See TracChangeset for help on using the changeset viewer.