diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-04-29 18:35:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-29 18:35:56 +0200 |
commit | 007f09d487da7f8e136cd1346feee2dcba28be61 (patch) | |
tree | 60d4c84b23f040b82397b0f36bce56c81ccb0199 /src/test/test-sizeof.c | |
parent | ccefd046c6c68520f91e49165a4f79f38ca0428e (diff) | |
parent | 26e1f724a63da8748c3dc73a8ad3769382f9905c (diff) |
Merge pull request #5783 from keszybz/compiler-warning-fixes
shared/extract-word: replace enum with int to avoid undefined behaviour
Diffstat (limited to 'src/test/test-sizeof.c')
-rw-r--r-- | src/test/test-sizeof.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index 36389b7710..269adfd18f 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -32,6 +32,14 @@ strstr(STRINGIFY(t), "signed") ? "" : \ ((t)-1 < (t)0 ? ", signed" : ", unsigned")); +enum Enum { + enum_value, +}; + +enum BigEnum { + big_enum_value = UINT64_C(-1), +}; + int main(void) { info(char); info(signed char); @@ -53,5 +61,8 @@ int main(void) { info(usec_t); info(__time_t); + info(enum Enum); + info(enum BigEnum); + return 0; } |