i3blocks-contrib icon indicating copy to clipboard operation
i3blocks-contrib copied to clipboard

The module `cpu_usage2` doesn't compile with clang/llvm

Open COLAMAroro opened this issue 1 year ago • 0 comments

Expected behavior

The module should build without any issue

Actual behavior

The module fails to build, with the following error message

cpu_usage2.c:127:25: error: invalid suffix 'D' on floating constant
    display(label, 100.0D * (used - old_used) / (total - old_total),

i3blocks config relevant to blocklet(s)

N/A

Output of blocklet(s) when run from command line

N/A

Output of any relevant other commands that might help diagnostics

This build error is causing build failures on upstream projects. See relevant Gentoo Bugzilla report: https://832200.bugs.gentoo.org/attachment.cgi?id=763789

According to cppreference, D is not a valid suffix for a floating-point literal. Removing the suffix would make it a double by default.

COLAMAroro avatar Sep 24 '23 21:09 COLAMAroro