On Thu, Oct 01, 2009 at 08:31:27PM +0200, Sasha Khapyorsky wrote:
> > @@ -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.

> Also wouldn't it be simpler to remove 'const' in "type * const var"
> function parameter definitions? This restricts only value of a pointer
> (not structure content), and since function parameters are passed by
> values such restriction is only related to a function implementation
> and actually meanless in sense of API. Thoughts?

Yah, type * const var is quite strange. Why propose this?

Then again, this existing is quite strange too:

> >                       IN const osm_log_level_t log_level)

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to