Warnings remove

View: New views
2 Messages — Rating Filter:   Alert me  

Warnings remove

by Andrea Viarengo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Christian,

I send you the patch which remove all warnings on MSVC++

The patch is based on your last build 158

diff.exe -u source-prepatch source > patch.dos.bin

I also add some #define into config.h including it where it was necessary.
In some source file I have had to move it before inclusion of <stdXXX.h>
There are only a strange case:

terminal.c

if I move config.h before "SDL.h "  Pipmak terminal doesn't work anymore (it write nothing)
I think because the macros BYTEORDER_XXXXX.

So I direct add definitions in that file...

Andrea





-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Pipmak-Devel mailing list
Pipmak-Devel@...
news://news.gmane.org/gmane.games.devel.pipmak.devel
https://lists.sourceforge.net/lists/listinfo/pipmak-devel

patch.dos.bin (24K) Download Attachment

Re: Warnings remove

by Christian Walther :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrea Viarengo wrote:
> diff.exe -u source-prepatch source > patch.dos.bin

Uhm, you still haven't got TortoiseSVN or the command line svn client to
produce patches for you? I'd look into getting that fixed as soon as
possible, it's much more convenient and less error-prone than fiddling
with diff manually.

> I also add some #define into config.h including it where it was necessary.
> In some source file I have had to move it before inclusion of <stdXXX.h>
> There are only a strange case:
>
> terminal.c
>
> if I move config.h before "SDL.h "  Pipmak terminal doesn't work anymore
> (it write nothing)
> I think because the macros BYTEORDER_XXXXX.
>
> So I direct add definitions in that file...

Good point, I haven't thought about the include order. Doesn't seem that
good an idea to use config.h after all. Would it be very inconvenient to
just continue to define these two MSVC-specific macros in the MSVC
project file? The alternative would be to introduce another header file
for them.

> - float az = azimuth*M_PI/180, el = elevation*M_PI/180;
> + float az = (float)(azimuth*M_PI/180), el = (float)(elevation*M_PI/180);
(and some other places)

That's not the proper fix for this. This way, there's still a conversion
from float to double and back. The proper thing to do is casting M_PI to
float, so that the whole calculation is done in float.

> - SDL_iconv(cd, &utf8text, &inbytesleft, &ucs2buf, &outbytesleft);
> + SDL_iconv(cd, (char **)&utf8text, &inbytesleft, &ucs2buf, &outbytesleft);

Don't undo the change that I just did in r157 :). That argument is now
declared as const, as it should be, in SDL 1.2.12.

  -Christian


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Pipmak-Devel mailing list
Pipmak-Devel@...
news://news.gmane.org/gmane.games.devel.pipmak.devel
https://lists.sourceforge.net/lists/listinfo/pipmak-devel