summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2016-05-04 17:38:03 +1000
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-27 22:25:19 -0400
commita5c23f0643b6a716a62df8cd5c284af88bcca1e6 (patch)
treef5c3cf0d8bc8088ba08aedaf1081466d970f215c
parentfcf4da76e031162cc78e4d57c8c22a415ac4094c (diff)
downloadpacman-a5c23f0643b6a716a62df8cd5c284af88bcca1e6.tar.xz
Prevent wrapping of enum items
GCC-6 points out that the value we use for the sentinal in enums is actually too large for the integer type. Reduce the bitshift by one to fix this. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 5b9bc6024c246f232c64f6409088fedf558917af)
-rw-r--r--lib/libalpm/alpm.h2
-rw-r--r--lib/libalpm/db.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 9b8166f9..168d71b0 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -203,7 +203,7 @@ typedef enum _alpm_siglevel_t {
ALPM_SIG_DATABASE_MARGINAL_OK = (1 << 12),
ALPM_SIG_DATABASE_UNKNOWN_OK = (1 << 13),
- ALPM_SIG_USE_DEFAULT = (1 << 31)
+ ALPM_SIG_USE_DEFAULT = (1 << 30)
} alpm_siglevel_t;
/** PGP signature verification status return codes */
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 9673c7b1..05ef43e0 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -40,7 +40,7 @@ typedef enum _alpm_dbinfrq_t {
/* ALL should be info stored in the package or database */
INFRQ_ALL = INFRQ_BASE | INFRQ_DESC | INFRQ_FILES |
INFRQ_SCRIPTLET | INFRQ_DSIZE,
- INFRQ_ERROR = (1 << 31)
+ INFRQ_ERROR = (1 << 30)
} alpm_dbinfrq_t;
/** Database status. Bitflags. */