From: Rich Felker Date: Sat, 25 Jun 2011 13:23:36 +0000 (-0400) Subject: const correctness in mq_notify X-Git-Tag: v0.7.11~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4d95a58524d277ce51a5d27d964f0628f6e23841;p=oweals%2Fmusl.git const correctness in mq_notify why did gcc allow this invalid assignment to compile in the first place? --- diff --git a/src/mq/mq_notify.c b/src/mq/mq_notify.c index 60bb2db2..3f8661eb 100644 --- a/src/mq/mq_notify.c +++ b/src/mq/mq_notify.c @@ -61,7 +61,7 @@ int mq_notify(mqd_t mqd, const struct sigevent *sev) sev2.sigev_notify = SIGEV_THREAD; sev2.sigev_signo = s; - sev2.sigev_value.sival_ptr = &zeros; + sev2.sigev_value.sival_ptr = (void *)&zeros; if (syscall(SYS_mq_notify, mqd, &sev2) < 0) { pthread_cancel(td);