From kde-core-devel Wed Jan 11 19:49:52 2023 From: Michael Reeves Date: Wed, 11 Jan 2023 19:49:52 +0000 To: kde-core-devel Subject: Re: New santizer warning in KF 5.98 headers Message-Id: X-MARC-Message: https://marc.info/?l=kde-core-devel&m=167346661713714 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--0000000000007f994c05f2024e86" --0000000000007f994c05f2024e86 Content-Type: text/plain; charset="UTF-8" That looks a lot better. Weird magic numbers are what enums are ment to avoid. On Wed, Jan 11, 2023 at 7:26 AM Nicolas Fella wrote: > On 1/10/23 22:49, Michael Reeves wrote: > > /usr/include/KF5/KConfigWidgets/kstandardaction.h:261:64: runtime > > error: load of value 4294967295, which is not a valid value for type > > 'Qt::ConnectionType' > > > > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior > > /usr/include/KF5/KConfigWidgets/kstandardaction.h:261:64 in > > > > The issue stems for assigning an int to a enum which is internally > > considered unsigned and possibly smaller than the four byte int. If > > this is doing what we expect than I need a way to shut off the warning. > Looks like > https://invent.kde.org/frameworks/kconfigwidgets/-/merge_requests/175 > aims to address this? > --0000000000007f994c05f2024e86 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That looks a lot better. Weird magic numbers are what enum= s are ment to avoid.

On Wed, Jan 11, 2023 at 7:26 AM Nicolas Fella <<= a href=3D"mailto:nicolas.fella@gmx.de">nicolas.fella@gmx.de> wrote:<= br>
On 1/10/23 22:49= , Michael Reeves wrote:
> /usr/include/KF5/KConfigWidgets/kstandardaction.h:261:64: runtime
> error: load of value 4294967295, which is not a valid value for type > 'Qt::ConnectionType'
>
> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
> /usr/include/KF5/KConfigWidgets/kstandardaction.h:261:64 in
>
> The issue stems for assigning an int to a enum which is internally
> considered unsigned and possibly smaller than the four byte int. If > this is doing what we expect than I need a way to shut off the warning= .
Looks like
https://invent.kde.org/framewor= ks/kconfigwidgets/-/merge_requests/175
aims to address this?
--0000000000007f994c05f2024e86--