diff mbox series

[v2,2/2] tests: Squash __attrconst related warnings

Message ID 20191113121422.20503-2-oohall@gmail.com
State Accepted
Headers show
Series [v2,1/2] makefiles: Make attribute suggestions non-errors | expand

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469)

Commit Message

Oliver O'Halloran Nov. 13, 2019, 12:14 p.m. UTC
Currently we get a warning because in some of the test stub functions:

        [ HOSTCC ]  hw/test/phys-map-test.c
In file included from hw/test/phys-map-test.c:8:
hw/test/../../core/test/stubs.c:78:1: warning: ‘const’ attribute on
function returning ‘void’ [-Wattributes]
   78 | {
      | ^

I'm pretty sure we added that __attrconst to squash a warning with an
earlier GCC, then they went an added a warning for the "fix." I love
compilers.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 core/test/stubs.c  | 4 ++--
 hdata/test/stubs.c | 6 ++----
 2 files changed, 4 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/core/test/stubs.c b/core/test/stubs.c
index 38e3d51793dd..2c2992796fb3 100644
--- a/core/test/stubs.c
+++ b/core/test/stubs.c
@@ -67,14 +67,14 @@  struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu,
 	return NULL;
 }
 
-void __attrconst cpu_wait_job(struct cpu_job *job, bool free_it)
+void cpu_wait_job(struct cpu_job *job, bool free_it)
 {
 	(void)job;
 	(void)free_it;
 	return;
 }
 
-void __attrconst cpu_process_local_jobs(void)
+void cpu_process_local_jobs(void)
 {
 }
 
diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c
index 1d924b6c479e..107f94811670 100644
--- a/hdata/test/stubs.c
+++ b/hdata/test/stubs.c
@@ -105,8 +105,7 @@  struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu,
 }
 
 void cpu_wait_job(struct cpu_job *job, bool free_it);
-
-void __attrconst cpu_wait_job(struct cpu_job *job, bool free_it)
+void cpu_wait_job(struct cpu_job *job, bool free_it)
 {
 	(void)job;
 	(void)free_it;
@@ -114,8 +113,7 @@  void __attrconst cpu_wait_job(struct cpu_job *job, bool free_it)
 }
 
 void cpu_process_local_jobs(void);
-
-void __attrconst cpu_process_local_jobs(void)
+void cpu_process_local_jobs(void)
 {
 }