summaryrefslogtreecommitdiff
path: root/x11-misc/i3blocks-contrib/files/i3blocks-contrib-2.0.0-fix-build-on-clang-llvm.patch
blob: bf92d791df55af54bcb66322fa40f72f56a0ae62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 230f42f5bc5ebc44062820bde1e9e40ae0746c00 Mon Sep 17 00:00:00 2001
From: Corentin Rondier <contact@rondier.io>
Date: Sun, 24 Sep 2023 23:22:58 +0200
Subject: [PATCH] cpu_usage2: fix build failures on clang/llvm

Remove a non-standard suffix on a floating-point literal, causing build failures on clang/LLVM

fixes #504
---
 cpu_usage2/cpu_usage2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpu_usage2/cpu_usage2.c b/cpu_usage2/cpu_usage2.c
index 72709037..483c4c81 100644
--- a/cpu_usage2/cpu_usage2.c
+++ b/cpu_usage2/cpu_usage2.c
@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
     sleep(t);
     total = get_usage(&used);
 
-    display(label, 100.0D * (used - old_used) / (total - old_total),
+    display(label, 100.0 * (used - old_used) / (total - old_total),
             warning, critical, decimals);
     fflush(stdout);
     old_total = total;