diff options
author | Andreas Schneider <asn@samba.org> | 2018-02-28 07:36:58 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2018-03-22 14:01:49 +0100 |
commit | 33da03f478955daa04adca67fc012379bf0d2a39 (patch) | |
tree | d0c91241174eedaf853cd105ca8208073b7cd87b | |
parent | f7fc3f5294fc4bfc917fe5827594b774be730f4b (diff) | |
download | socket_wrapper-33da03f478955daa04adca67fc012379bf0d2a39.tar.gz socket_wrapper-33da03f478955daa04adca67fc012379bf0d2a39.tar.xz socket_wrapper-33da03f478955daa04adca67fc012379bf0d2a39.zip |
cmake: Fix configure check for fall-through attribute
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | ConfigureChecks.cmake | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index f06e780..93010f4 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -205,22 +205,13 @@ int main(void) { check_c_source_compiles(" #define FALL_THROUGH __attribute__((fallthrough)) -enum direction_e { - UP = 0, - DOWN, -}; - int main(void) { - enum direction_e key = UP; - int i = 10; - int j = 0; + int i = 2; - switch (key) { - case UP: - i = 5; + switch (i) { + case 0: FALL_THROUGH; - case DOWN: - j = i * 2; + case 1: break; default: break; |