>> > @@ -1106,9 +1109,9 @@ void osm_dump_path_record(IN osm_log_t * p_log, IN >const ib_path_rec_t * p_pr, >> > "\t\t\t\tresv2...................0x%X\n" >> > "\t\t\t\tresv3...................0x%X\n", >> > cl_ntoh64(p_pr->service_id), >> > - inet_ntop(AF_INET6, p_pr->dgid.raw, gid_str, >> > + inet_ntop(AF_INET6, (void*)p_pr->dgid.raw, gid_str, >> >> And why is such casting(s) needed? > >Casting away const like that is incorrect, fix your inet_ntop to have >a POSIX signature or ignore the warning.
The WinOF version of inet_ntop is: const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); The MS version of inet_ntop (available in vista and later) is: "The ANSI version of this function is inet_ntop" PCTSTR WSAAPI InetNtop( __in INT Family, __in PVOID pAddr, __out PTSTR pStringBuf, __in size_t StringBufSize ); I'm guessing inet_ntop maps directly to InetNtop, but I can't find the definition in the header file. We use the MS version of the function when available. _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
