[openib-general] [PATCH] osm: port to WinIB stack - 64 bits

Sasha Khapyorsky sashak at voltaire.com
Sun Oct 15 10:21:17 PDT 2006


On 17:45 Sun 15 Oct     , Yevgeny Kliteynik wrote:
> Hi Sasha,
> 
> Sasha Khapyorsky wrote:
> > Hi Evgeny,
> > 
> > On 16:31 Sun 15 Oct     , Yevgeny Kliteynik wrote:
> >> Hi Hal
> >>
> >> This patch fixes a few data type problems with OSM on 
> >> 64-bit Windows machines.
> > 
> > Could you explain what those problems are?
>  
> Basically, in all three files the problem was assigning
> the result of pointer arithmetics (which is __int64) to 
> an int/uint variable.
> Casting to int is ok because, as I said, this result is 
> actually string length, index in table, or index in string, 
> so no range check is required.

So isn't it better to shut-up compiler warnings/whatever with appropriate 
warning level flags instead of putting confused castings in the code?

(I know there are couple of such already, but I don't think it was a
good idea). 

Sasha




More information about the general mailing list