Skip to contentSkip to conversation

package/cpulimit: Correct function signature to use named parmeters

PATCH Applied Florian Fainelli 2 participants 3 messages Oct 17, 2025 – Jan 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/cpulimit: Correct function signature to use named parmeters

Update 0005-Correct-loop-function-signature.patch to include a named parameter otherwise the following compiler warning turned error is triggered:

busy.c:6:1: error: parameter name omitted
void *loop(void *)
^~~~

---
 package/cpulimit/0005-Correct-loop-function-signature.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/cpulimit/0005-Correct-loop-function-signature.patch +3 -3
index 5b7f4a01dd5e..5b44ab9782c2 100644
@@ -1,4 +1,4 @@
-From 74e95c96e8d82e4e374f86142972fcf4305fe1f2 Mon Sep 17 00:00:00 2001
+From e94b6dd7b3ca884f72f02879fd85792a3aee961d Mon Sep 17 00:00:00 2001
 From: Florian Fainelli <[email protected]>
 Date: Wed, 2 Jul 2025 20:47:58 -0700
 Subject: [PATCH] Correct loop function signature
@@ -23,7 +23,7 @@ Upstream: https://github.com/opsengine/cpulimit/pull/127
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tests/busy.c b/tests/busy.c
-index b3afb7cd853b..93f0bcce67a8 100644
+index b3afb7cd853b..8acbcd82e04f 100644
 --- a/tests/busy.c
 +++ b/tests/busy.c
 @@ -3,7 +3,7 @@
@@ -31,7 +31,7 @@ index b3afb7cd853b..93f0bcce67a8 100644
  #include <unistd.h>
  
 -void *loop()
-+void *loop(void *)
++void *loop(void *unused)
  {
  	while(1);
  }
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Florian,

Happy New Year and best wishes for 2026! :-)

Quoted 8 lines · On Fri, 17 Oct 2025 10:16:08 -0700 Florian Fainelli <[email protected]>…

Update 0005-Correct-loop-function-signature.patch to include a named parameter otherwise the following compiler warning turned error is triggered:

busy.c:6:1: error: parameter name omitted
void *loop(void *)
^~~~

Quoted 7 lines
---
 package/cpulimit/0005-Correct-loop-function-signature.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied to master after extending the commit log to explain a bit which configurations are affected. Oddly enough recent compilers are happy, but older GCC versions <= 10.x are not happy with the unnamed parameter.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Florian Fainelli

In reply of:

Quoted 4 lines

Update 0005-Correct-loop-function-signature.patch to include a named parameter otherwise the following compiler warning turned error is triggered:

Quoted 8 lines

busy.c:6:1: error: parameter name omitted
void *loop(void *)
^~~~

Applied to 2025.02.x and 2025.11.x. Thanks

Quoted 39 lines
---
 package/cpulimit/0005-Correct-loop-function-signature.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/cpulimit/0005-Correct-loop-function-signature.patch +3 -3
index 5b7f4a01dd5e..5b44ab9782c2 100644
@@ -1,4 +1,4 @@
-From 74e95c96e8d82e4e374f86142972fcf4305fe1f2 Mon Sep 17 00:00:00 2001
+From e94b6dd7b3ca884f72f02879fd85792a3aee961d Mon Sep 17 00:00:00 2001
 From: Florian Fainelli <[email protected]>
 Date: Wed, 2 Jul 2025 20:47:58 -0700
 Subject: [PATCH] Correct loop function signature
@@ -23,7 +23,7 @@ Upstream: https://github.com/opsengine/cpulimit/pull/127
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tests/busy.c b/tests/busy.c
-index b3afb7cd853b..93f0bcce67a8 100644
+index b3afb7cd853b..8acbcd82e04f 100644
 --- a/tests/busy.c
 +++ b/tests/busy.c
 @@ -3,7 +3,7 @@
@@ -31,7 +31,7 @@ index b3afb7cd853b..93f0bcce67a8 100644
  #include <unistd.h>
 
 -void *loop()
-+void *loop(void *)
++void *loop(void *unused)
  {
  	while(1);
  }
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot