Marian Buschsieweke
0b01fa0025
core/compiler_hints: Add NONSTRING attribute
...
This adds the `NONSTRING` attribute that is defined as either
`__attribute__((nonstring))` or as empty, depending on whether the
toolchain understands the `nonstring` attribute.
This allows declaring char arrays as not being a zero-terminated
c-string without cluttering the code with preprocessor conditinational
to ensure backward compatibility with compilers that do not support
`-Wunterminated-string-initialization` yet.
2025-04-27 22:49:22 +02:00
Marian Buschsieweke
914429c5f5
core/lib/include/compiler_hints.h: fix style
...
This adds indent to make reading preprocessor conditionals easier, as
is recommended by our coding convention.
2025-04-27 22:49:22 +02:00
JerelJr
04dafd5618
core: replace header guards with #pragma once
...
core/lib/include/ringbuffer.h: removed trailing newline
core/lib/include/irq.h: restored header guard for irq.h to resolve build errors
core/lib/include/irq.h: added trailing newline to irq.h
2025-04-15 14:55:38 -04:00
Benjamin Valentin
0ee46e8d42
core/compiler_hints: add may_be_zero()
2023-05-23 17:46:39 +02:00
Benjamin Valentin
a5bc1b3722
core/compiler_hints: fix detection of __builtin_unreachable()
2023-04-27 16:15:16 +02:00
Benjamin Valentin
c1f63cafa8
core/compiler_hints: add assume() hint
2023-03-06 20:22:39 +01:00
Teufelchen1
a8c9af901c
core/xfa: disable asan on llvm
2023-02-15 17:41:35 +01:00
Benjamin Valentin
75f666f6b3
core/compiler_hints: add likely() / unlikely() hints
2023-01-18 01:17:31 +01:00
Karl Fessel
b4feefa334
core/lib: define MAYBE_UNUSED
2022-11-17 12:26:35 +01:00
Karl Fessel
fe325ecdd2
core/lib: compiler_hints guard NORETURN and PURE
2022-11-17 12:26:35 +01:00
Karl Fessel
045bd7a1a2
core/lib: split kernel defines by its concerns
2022-11-11 13:41:33 +01:00