diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-14 06:55:31 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-14 07:39:06 +0200 |
commit | 1113e50796315a2aaaf768a243e3788cdb4aac78 (patch) | |
tree | d36eb1d9c1294828069085c5fb84a90650847c2f /src/test | |
parent | socket-util: add one missing paren (diff) | |
download | systemd-1113e50796315a2aaaf768a243e3788cdb4aac78.tar.xz systemd-1113e50796315a2aaaf768a243e3788cdb4aac78.zip |
tree-wide: replace __alignof__() with alignof()
Addresses https://github.com/systemd/systemd/pull/27254#discussion_r1165267046.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-sizeof.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index 55bd81e22f..30b252ecd9 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -17,16 +17,16 @@ DISABLE_WARNING_TYPE_LIMITS; #define info_no_sign(t) \ - printf("%s → %zu bits, %zu byte alignment\n", STRINGIFY(t), \ + printf("%s → %zu bits, %zu byte alignment\n", STRINGIFY(t), \ sizeof(t)*CHAR_BIT, \ - __alignof__(t)) + alignof(t)) #define info(t) \ - printf("%s → %zu bits%s, %zu byte alignment\n", STRINGIFY(t), \ + printf("%s → %zu bits%s, %zu byte alignment\n", STRINGIFY(t), \ sizeof(t)*CHAR_BIT, \ strstr(STRINGIFY(t), "signed") ? "" : \ (t)-1 < (t)0 ? ", signed" : ", unsigned", \ - __alignof__(t)) + alignof(t)) enum Enum { enum_value, @@ -44,7 +44,7 @@ enum BigEnum2 { int main(void) { int (*function_pointer)(void); - info_no_sign(function_pointer); + info_no_sign(typeof(function_pointer)); info_no_sign(void*); info(char*); |