Remove two casts from os-linux.h
authorBart Van Assche <bvanassche@acm.org>
Wed, 24 Aug 2022 21:54:39 +0000 (14:54 -0700)
committerBart Van Assche <bvanassche@acm.org>
Tue, 30 Aug 2022 22:56:17 +0000 (15:56 -0700)
This patch prepares for merging the os-linux.h and os-android.h header files.
While CPU_CLR() and CPU_SET() are defined as statement expressions in
the Linux header files, these macros have been defined as statements in
the Android header files. Remove the '(void)' casts to prevent the
introduction of a build error when merging the Linux and Android header
files.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
os/os-linux.h

index 3001140ca486630d6bb60a2958c01d824fbd7fc8..4a05a77517dc189c94da61430da1c57e4519f8c6 100644 (file)
@@ -81,8 +81,8 @@ typedef cpu_set_t os_cpu_mask_t;
        pthread_getaffinity_np(pthread_self(), sizeof(mask), &(mask))
 #endif
 
-#define fio_cpu_clear(mask, cpu)       (void) CPU_CLR((cpu), (mask))
-#define fio_cpu_set(mask, cpu)         (void) CPU_SET((cpu), (mask))
+#define fio_cpu_clear(mask, cpu)       CPU_CLR((cpu), (mask))
+#define fio_cpu_set(mask, cpu)         CPU_SET((cpu), (mask))
 #define fio_cpu_isset(mask, cpu)       (CPU_ISSET((cpu), (mask)) != 0)
 #define fio_cpu_count(mask)            CPU_COUNT((mask))