From: Gerrit Klein Date: Wed, 26 Apr 2023 21:44:56 +0000 (+0200) Subject: fix: compiler warning `-Wswitch-enum` X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=8dd73cf99b9bd3dbbbbe7268088ffd3e66b2e50a;p=librseq.git fix: compiler warning `-Wswitch-enum` 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 --- 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; }