https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272029

            Bug ID: 272029
           Summary: multimedia/phonon: fix build with clang 16
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: k...@freebsd.org
          Reporter: d...@freebsd.org
             Flags: maintainer-feedback?(k...@freebsd.org)
          Assignee: k...@freebsd.org

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/phonon4qt5experimental_autogen/EWIEGA46WW/../../../../../phonon-4.11.1/phonon/experimental/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/phonon4qt5experimental_autogen/EWIEGA46WW/../../../../../phonon-4.11.1/phonon/experimental/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>(VisualizationType)>
VisualizationDescriptionModel;
                                 ^
 
/wrkdirs/usr/ports/multimedia/phonon/work/phonon-4.11.1/phonon/objectdescription.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/objectdescription.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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to