From 8dd73cf99b9bd3dbbbbe7268088ffd3e66b2e50a Mon Sep 17 00:00:00 2001 From: Gerrit Klein Date: Wed, 26 Apr 2023 23:44:56 +0200 Subject: [PATCH] fix: compiler warning `-Wswitch-enum` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes warning "enumeration value ‘XXXX’ not handled in switch [-Wswitch-enum]" which was observed on gcc 11.3.0 on Ubuntu 22.04 LTS Linux 6.3.0 x86-64. This warning was enabled by the flag `-Wswitch-enum` (see: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wswitch-enum) Signed-off-by: Gerrit Klein Signed-off-by: Mathieu Desnoyers Change-Id: I86cde0be01bf32cb5f6ea0ad313001bba717a9ff --- include/rseq/rseq.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/rseq/rseq.h b/include/rseq/rseq.h index 0989ef7..080508e 100644 --- a/include/rseq/rseq.h +++ b/include/rseq/rseq.h @@ -369,6 +369,10 @@ int rseq_cmpeqv_trystorev_storev(enum rseq_mo rseq_mo, enum rseq_percpu_mode per default: return -1; } + case RSEQ_MO_ACQUIRE: /* Fallthrough */ + case RSEQ_MO_ACQ_REL: /* Fallthrough */ + case RSEQ_MO_CONSUME: /* Fallthrough */ + case RSEQ_MO_SEQ_CST: /* Fallthrough */ default: return -1; } @@ -417,6 +421,10 @@ int rseq_cmpeqv_trymemcpy_storev(enum rseq_mo rseq_mo, enum rseq_percpu_mode per default: return -1; } + case RSEQ_MO_ACQUIRE: /* Fallthrough */ + case RSEQ_MO_ACQ_REL: /* Fallthrough */ + case RSEQ_MO_CONSUME: /* Fallthrough */ + case RSEQ_MO_SEQ_CST: /* Fallthrough */ default: return -1; } -- 2.34.1