hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
273 stars 47 forks source link

hyprland-share-picker fails to build with Clang #22

Closed jbeich closed 1 year ago

jbeich commented 1 year ago

Regressed by 27118ee3d71b

$ export CC=clang CXX=clang++
$ cmake -G Ninja -S hyprland-share-picker -B /tmp/hyprland-share-picker_build
$ cmake --build /tmp/hyprland-share-picker_build
[...]
hyprland-share-picker/main.cpp:64:51: error: non-constant-expression cannot be narrowed from type 'long long' to 'unsigned long' in initializer list [-Wc++11-narrowing]
            result.push_back({TITLESTR, CLASSSTR, std::stoll(IDSTR)});
                                                  ^~~~~~~~~~~~~~~~~
hyprland-share-picker/main.cpp:64:51: note: insert an explicit cast to silence this issue
            result.push_back({TITLESTR, CLASSSTR, std::stoll(IDSTR)});
                                                  ^~~~~~~~~~~~~~~~~
                                                  static_cast<unsigned long>( )
1 error generated.
vaxerski commented 1 year ago

haha clang deez nuts

a9b76c7f997daffa0fababdb54e5feb2ee05fdc1