> 18 дек. 2014 г., в 15:32, James Starkey <[email protected]> написал(а):
> 
> Uh, if you made it type-safe in the first place, you would need casts.
> 
> Think about that over and over until you get it -- if things are declared and 
> used properly, you never need casts.
> 
> Artificial types (used in moderation) eliminate most problems and make the 
> code easier to understand.
> 
I’m just try to fix errors. I’m not write all of the code but as I see Firebird 
have lots of casts instead of using proper types. So seems my patch is not 
good. I’m still get cast error.
Without my patch I have next error:

C:/git/mingw/mingw-w64-firebird-git/src/x86_64/src/remote/inet.cpp: In function 
'unsigned int forkThread(void*)':
C:/git/mingw/mingw-w64-firebird-git/src/x86_64/src/remote/inet.cpp:1790:31: 
error: cast from 'void*' to 'USHORT {aka short unsigned int}' loses precision 
[-fpermissive]
  const USHORT flag = (USHORT) arg;
                                                        ^

This is really wrong conversion from 64bit integer to 32bit. Next flag will be 
passed to CreateProcess function that want it to be DWORD.

> On Thursday, December 18, 2014, Alexey Pavlov <[email protected] 
> <mailto:[email protected]>> wrote:
> Not sure if I'm properly fix it but I try.
> 
> 
> -- 
> Jim Starkey
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrkFirebird-Devel
>  mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to