Re: [Flightgear-devel] Chasing warnings...

2009-08-25 Thread Tim Moore
Torsten Dreyer wrote: While iterating through the source files, trying to eliminate the warnings, I just found this precious line of code (some more of them in the same file) *((float*)buf[length]) = sg_bswap_32(*(uint32_t*)val); The beauty of pointers - poor Java, C# et al developers.

Re: [Flightgear-devel] Chasing warnings...

2009-08-25 Thread Erik Hofman
Tim Moore wrote: The worst thing about that line is that it is broken :) I can't find anything about it that makes it 'broken', knowing that doubles are 64-bit and floats are 32-bit. It might be a bit better this way though. Erik

Re: [Flightgear-devel] Chasing warnings...

2009-08-25 Thread Anders Gidenstam
On Tue, 25 Aug 2009, Erik Hofman wrote: Tim Moore wrote: The worst thing about that line is that it is broken :) I can't find anything about it that makes it 'broken', knowing that doubles are 64-bit and floats are 32-bit. It might be a bit better this way though. The line:

Re: [Flightgear-devel] Chasing warnings...

2009-08-25 Thread Erik Hofman
Anders Gidenstam wrote: On Tue, 25 Aug 2009, Erik Hofman wrote: Tim Moore wrote: The worst thing about that line is that it is broken :) I can't find anything about it that makes it 'broken', knowing that doubles are 64-bit and floats are 32-bit. It might be a bit better this way

[Flightgear-devel] Chasing warnings...

2009-08-21 Thread Torsten Dreyer
While iterating through the source files, trying to eliminate the warnings, I just found this precious line of code (some more of them in the same file) *((float*)buf[length]) = sg_bswap_32(*(uint32_t*)val); The beauty of pointers - poor Java, C# et al developers. You will never see something

Re: [Flightgear-devel] Chasing warnings...

2009-08-21 Thread Curtis Olson
Yeah, but just try byte swapping in visual basic ... it can be done! Thanks for the warning clean up pass, it's very much appreciated! Curt. On Fri, Aug 21, 2009 at 4:45 PM, Torsten Dreyer wrote: While iterating through the source files, trying to eliminate the warnings, I just found this