Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The module cpu_usage2 doesn't compile with clang/llvm #504

Open
COLAMAroro opened this issue Sep 24, 2023 · 0 comments · May be fixed by #505
Open

The module cpu_usage2 doesn't compile with clang/llvm #504

COLAMAroro opened this issue Sep 24, 2023 · 0 comments · May be fixed by #505

Comments

@COLAMAroro
Copy link

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 added a commit to COLAMAroro/i3blocks-contrib that referenced this issue Sep 24, 2023
Remove a non-standard suffix on a floating-point literal, causing build failures on clang/LLVM

fixes vivien#504
@COLAMAroro COLAMAroro linked a pull request Sep 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant