diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-05-25 18:20:52 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-05-25 18:25:09 +0200 |
commit | 6028d766d15c616b8b938d4e5e57afc3dfe304dd (patch) | |
tree | a2b7cb4482014bbd11793a439196768c8c63b338 /src/shared/json.c | |
parent | tree-wide: use DISABLE_WARNING_FORMAT_NONLITERAL where appropriate (diff) | |
download | systemd-6028d766d15c616b8b938d4e5e57afc3dfe304dd.tar.xz systemd-6028d766d15c616b8b938d4e5e57afc3dfe304dd.zip |
macro: introduce DISABLE_WARNING_TYPE_LIMITS and make use of it everywhere
Diffstat (limited to 'src/shared/json.c')
-rw-r--r-- | src/shared/json.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shared/json.c b/src/shared/json.c index c269cc992f..a3ad5b996a 100644 --- a/src/shared/json.c +++ b/src/shared/json.c @@ -4091,10 +4091,9 @@ int json_dispatch_uid_gid(const char *name, JsonVariant *variant, JsonDispatchFl assert_cc(sizeof(uid_t) == sizeof(uint32_t)); assert_cc(sizeof(gid_t) == sizeof(uint32_t)); -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wtype-limits" + DISABLE_WARNING_TYPE_LIMITS; assert_cc(((uid_t) -1 < (uid_t) 0) == ((gid_t) -1 < (gid_t) 0)); -#pragma GCC diagnostic pop + REENABLE_WARNING; if (json_variant_is_null(variant)) { *uid = UID_INVALID; |