mirror of
https://github.com/ipxe/ipxe
synced 2026-02-10 10:10:21 +03:00
[libc] Make static_assert() available via assert.h
Expose static_assert() via assert.h and migrate link-time assertions to build-time assertions where possible. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -219,8 +219,7 @@ static int script_exec ( struct image *image ) {
|
||||
static int script_probe ( struct image *image ) {
|
||||
static const char ipxe_magic[] = "#!ipxe";
|
||||
static const char gpxe_magic[] = "#!gpxe";
|
||||
linker_assert ( sizeof ( ipxe_magic ) == sizeof ( gpxe_magic ),
|
||||
magic_size_mismatch );
|
||||
static_assert ( sizeof ( ipxe_magic ) == sizeof ( gpxe_magic ) );
|
||||
char test[ sizeof ( ipxe_magic ) - 1 /* NUL */
|
||||
+ 1 /* terminating space */];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user