提交 4d95a585 编写于 作者: R Rich Felker

const correctness in mq_notify

why did gcc allow this invalid assignment to compile in the first place?
上级 568b8075
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册