From 858ee03fd3a54f06187663d74ae7c39d239df87f Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Tue, 13 Oct 2015 11:46:31 +0300 Subject: [PATCH] Fixed Windows builds by removing the __attribute__((unused)) construct. --- sysbench/scripting/script_lua.c | 4 +++- sysbench/tests/cpu/sb_cpu.c | 6 ++++-- sysbench/tests/memory/sb_memory.c | 6 ++++-- sysbench/tests/threads/sb_threads.c | 4 +++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sysbench/scripting/script_lua.c b/sysbench/scripting/script_lua.c index 03c21e7..5e31a7a 100644 --- a/sysbench/scripting/script_lua.c +++ b/sysbench/scripting/script_lua.c @@ -234,10 +234,12 @@ int sb_lua_init(void) return 0; } -sb_request_t sb_lua_get_request(int __attribute__((unused))thread_id) +sb_request_t sb_lua_get_request(int thread_id) { sb_request_t req; + (void) thread_id; /* unused */ + if (sb_globals.max_requests != 0 && nevents >= sb_globals.max_requests) { req.type = SB_REQ_TYPE_NULL; diff --git a/sysbench/tests/cpu/sb_cpu.c b/sysbench/tests/cpu/sb_cpu.c index 48da450..a1552cc 100644 --- a/sysbench/tests/cpu/sb_cpu.c +++ b/sysbench/tests/cpu/sb_cpu.c @@ -97,10 +97,12 @@ int cpu_init(void) } -sb_request_t cpu_get_request(int __attribute__ ((unused)) thread_id) +sb_request_t cpu_get_request(int thread_id) { sb_request_t req; - + + (void) thread_id; /* unused */ + if (sb_globals.max_requests > 0 && req_performed >= sb_globals.max_requests) { req.type = SB_REQ_TYPE_NULL; diff --git a/sysbench/tests/memory/sb_memory.c b/sysbench/tests/memory/sb_memory.c index 9c6e2ea..977e17a 100644 --- a/sysbench/tests/memory/sb_memory.c +++ b/sysbench/tests/memory/sb_memory.c @@ -216,11 +216,13 @@ int memory_init(void) } -sb_request_t memory_get_request(int thread_id __attribute__((unused))) +sb_request_t memory_get_request(int thread_id) { sb_request_t req; sb_mem_request_t *mem_req = &req.u.mem_request; - + + (void) thread_id; /* unused */ + SB_THREAD_MUTEX_LOCK(); if (total_bytes >= memory_total_size) { diff --git a/sysbench/tests/threads/sb_threads.c b/sysbench/tests/threads/sb_threads.c index b6f19cb..aa3d5b9 100644 --- a/sysbench/tests/threads/sb_threads.c +++ b/sysbench/tests/threads/sb_threads.c @@ -138,11 +138,13 @@ int threads_cleanup(void) } -sb_request_t threads_get_request(int thread_id __attribute__((unused))) +sb_request_t threads_get_request(int thread_id) { sb_request_t sb_req; sb_threads_request_t *threads_req = &sb_req.u.threads_request; + (void) thread_id; /* unused */ + SB_THREAD_MUTEX_LOCK(); if (sb_globals.max_requests > 0 && req_performed >= sb_globals.max_requests) {