maintainer-feedback requested: [Bug 272029] multimedia/phonon: fix build with clang 16
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jun 16 19:56:50 BST 2023
Bugzilla Automation <bugzilla at FreeBSD.org> has asked freebsd-kde (Team)
<kde at FreeBSD.org> for maintainer-feedback:
Bug 272029: multimedia/phonon: fix build with clang 16
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272029
--- Description ---
Clang 16 has a new error about integer values being outside the valid
range for enum types, which shows up when building multimedia/phonon:
/wrkdirs/usr/ports/multimedia/phonon/work/.build/phonon/experimental/phonon4qt5
experimental_autogen/EWIEGA46WW/../../../../../phonon-4.11.1/phonon/experimenta
l/visualization.h:45:27:
error: integer value 4294967294 is outside the valid range of values [0, 7] for
the enumeration type 'ObjectDescriptionType' [-Wenum-constexpr-conversion]
typedef
ObjectDescription<static_cast<Phonon::ObjectDescriptionType>(VisualizationType)
>
VisualizationDescription;
^
/wrkdirs/usr/ports/multimedia/phonon/work/.build/phonon/experimental/phonon4qt5
experimental_autogen/EWIEGA46WW/../../../../../phonon-4.11.1/phonon/experimenta
l/visualization.h:46:32:
error: integer value 4294967294 is outside the valid range of values [0, 7] for
the enumeration type 'ObjectDescriptionType' [-Wenum-constexpr-conversion]
typedef
ObjectDescriptionModel<static_cast<Phonon::ObjectDescriptionType>(Visualization
Type)>
VisualizationDescriptionModel;
^
/wrkdirs/usr/ports/multimedia/phonon/work/phonon-4.11.1/phonon/objectdescriptio
n.h:189:41:
error: integer value 4294967294 is outside the valid range of values [0, 7] for
the enumeration type 'ObjectDescriptionType' [-Wenum-constexpr-conversion]
static inline ObjectDescription<T> fromIndex(int index) {
//krazy:exclude=inline
^
/wrkdirs/usr/ports/multimedia/phonon/work/phonon-4.11.1/phonon/objectdescriptio
n.h:260:45:
error: integer value 4294967294 is outside the valid range of values [0, 7] for
the enumeration type 'ObjectDescriptionType' [-Wenum-constexpr-conversion]
friend class ObjectDescriptionModel<T>;
^
This is because enum ObjectDescriptionType only has 6 members, and
therefore only gets 3 bits allocated by default. In that case, values
like 4294967294 (0xfffffffe) do not fit in it.
Work around the problem by declaring enum ObjectDescriptionType to
explicitly be of type unsigned, so it can fit 32 bits.
More information about the kde-freebsd
mailing list