summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2023-04-03 08:25:35 -0400
committerFlorian Festi <ffesti@redhat.com>2023-04-03 15:13:35 +0200
commit3cec5f81cd202946c2ea033c966919262daacb1e (patch)
treeb7c05c2109ec275c2b769469ac72e74b4e3cd142
parent8310b34a38b419b0ae6a7669805754f11e472c1c (diff)
downloadrpm-3cec5f81cd202946c2ea033c966919262daacb1e.tar.gz
Remove RPM_MASK_RETURN_TYPE from rpmTagReturnType_e; make it a macro
RPM_MASK_RETURN_TYPE is 0xffff0000 which is UINT_MAX. Per ISO C, enumerator values must be in the signed int range. gcc is more forgiving with this than certain versions of clang and if you are on a random system, such as FreeBSD 13.1 with clang 13.0.0, you will get this error when trying to compile software that links with librpm and uses the rpm headers: error: ISO C restricts enumerator values to range of 'int' (4294901760 is too large) [-Werror,-Wpedantic] Similar to the other enums in rpmtag.h, RPM_MASK_RETURN_TYPE is not actually a value used from the enum, so take it out of the enum and make it a macro. Signed-off-by: David Cantrell <dcantrell@redhat.com>
-rw-r--r--include/rpm/rpmtag.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rpm/rpmtag.h b/include/rpm/rpmtag.h
index e977be52a..dec9c9244 100644
--- a/include/rpm/rpmtag.h
+++ b/include/rpm/rpmtag.h
@@ -485,8 +485,8 @@ enum rpmTagReturnType_e {
RPM_ANY_RETURN_TYPE = 0,
RPM_SCALAR_RETURN_TYPE = 0x00010000,
RPM_ARRAY_RETURN_TYPE = 0x00020000,
- RPM_MAPPING_RETURN_TYPE = 0x00040000,
- RPM_MASK_RETURN_TYPE = 0xffff000
+ RPM_MAPPING_RETURN_TYPE = 0x00040000
+#define RPM_MASK_RETURN_TYPE 0xffff0000
};
typedef rpmFlags rpmTagReturnType;