Skip to main content
GameDev.net gamedev.net
🔒 Locked

Disable warning by type ?

Started by FDsagizi Oct 16, 2012 at 3:57 AM 5 replies 1.4k views
Original Post
FDsagizi
FDsagizi
Hi smile.png
exemple: Signed/Unsigned mismatch - it's not warning for me



int cur_index;

if( cur_index > array.size() )
{
}

need write

if( cur_index > int( array.size() ) )
{
}



a do not can ignore by msg->message as this:



void ScriptBuildClient::MessageCallback(const asSMessageInfo *msg, void *param)
{
if( msg->message == Str( "Signed/Unsigned mismatch" ) )
{
return;
}
}

on warning i have 2 lines about this, first it "Signed/Unsigned mismatch" and second it name method where is!
WitchLord
WitchLord
I have thought about adding ways of disabling individual warnings before, but it's not really something I'm putting high up on my to-do list.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
FDsagizi
FDsagizi
Ok smile.png

Wat you think about refractoring code ?

On current time, for me it is realy need functionality.
WitchLord
WitchLord
If you want to remove this warning yourself, you can just comment out the following two lines in the code:


if( signMismatch )
Warning(TXT_SIGNED_UNSIGNED_MISMATCH, node);


You'll find it in as_compiler.cpp around line 10789.

If the warning is not sent to the message callback, then the the information message with "Compiling XXX" won't be sent either (unless there are other warnings or errors).
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel
FDsagizi
FDsagizi
Thanks this helped!
FDsagizi
FDsagizi
so next warning abaut this history smile.png

"Implicit conversion of value is not exact"

script:

int w = 1920.0 * 0.3;
WitchLord
WitchLord
Search for where TXT_NOT_EXACT is used, and comment out the call to Warning()
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.