diff options
Diffstat (limited to 'miscutils/taskset.c')
-rw-r--r-- | miscutils/taskset.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 708abd9f2..973f94ac3 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c | |||
@@ -35,7 +35,8 @@ static char *__from_cpuset(cpu_set_t *mask) | |||
35 | #define TASKSET_PRINTF_MASK "%x" | 35 | #define TASKSET_PRINTF_MASK "%x" |
36 | /* (void*) cast is for battling gcc: */ | 36 | /* (void*) cast is for battling gcc: */ |
37 | /* "dereferencing type-punned pointer will break strict-aliasing rules" */ | 37 | /* "dereferencing type-punned pointer will break strict-aliasing rules" */ |
38 | #define from_cpuset(mask) (*(unsigned*)(void*)&(mask)) | 38 | #define from_cpuset(mask) ({ void *__vp = &(mask); *(unsigned*)__vp; }) |
39 | /* gcc 4.3.0 still complains: #define from_cpuset(mask) (*(unsigned*)(void*)&(mask)) */ | ||
39 | #endif | 40 | #endif |
40 | 41 | ||
41 | 42 | ||