Disable warning by type ?

Started by
5 comments, last by WitchLord 11 years, 6 months 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!
Advertisement
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

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;
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