C standard stipulates that we have to cast the function to another of the same type to avoid unexpected behavior. We aren't using the function in this case, but Nick correctly points out that we should follow the standard regardless.
Refs trac:3755 This commit was SVN r29210. The following Trac tickets were found above: Ticket 3755 --> https://svn.open-mpi.org/trac/ompi/ticket/3755
Этот коммит содержится в:
родитель
804545278f
Коммит
7bc20866fd
@ -71,7 +71,8 @@ ev_arc4random_buf(void *buf, size_t n)
|
|||||||
* trickery.)
|
* trickery.)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
void* tptr = (void*)arc4random_buf;
|
void (*tptr)(void *,size_t) =
|
||||||
|
(void (*)(void*,size_t))arc4random_buf;
|
||||||
if (tptr != NULL) {
|
if (tptr != NULL) {
|
||||||
return arc4random_buf(buf, n);
|
return arc4random_buf(buf, n);
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user