Advertisement

Disable warning by type ?

Started by October 16, 2012 03:57 AM
5 comments, last by WitchLord 12 years, 1 month ago
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!
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 - Tower - free puzzle game

Advertisement
Ok smile.png

Wat you think about refractoring code ?

On current time, for me it is realy need functionality.
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 - Tower - free puzzle game

Thanks this helped!
so next warning abaut this history smile.png

"Implicit conversion of value is not exact"

script:

int w = 1920.0 * 0.3;
Advertisement
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 - Tower - free puzzle game

This topic is closed to new replies.

Advertisement