Merge pull request #5783 from keszybz/compiler-warning-fixes

shared/extract-word: replace enum with int to avoid undefined behaviour
This commit is contained in:
Lennart Poettering
2017-04-29 18:35:56 +02:00
committed by GitHub
3 changed files with 18 additions and 2 deletions
+11
View File
@@ -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;
}