Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

Disable warning by type ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 FDsagizi   Members   -  Reputation: 514

Like
0Likes
Like

Posted 15 October 2012 - 09:57 PM

Hi Posted Image
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!

Edited by FDsagizi, 15 October 2012 - 09:58 PM.


Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3238

Like
0Likes
Like

Posted 16 October 2012 - 07:35 AM

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

#3 FDsagizi   Members   -  Reputation: 514

Like
0Likes
Like

Posted 17 October 2012 - 11:38 AM

Ok Posted Image

Wat you think about refractoring code ?

On current time, for me it is realy need functionality.

#4 Andreas Jonsson   Moderators   -  Reputation: 3238

Like
0Likes
Like

Posted 17 October 2012 - 04:54 PM

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

#5 FDsagizi   Members   -  Reputation: 514

Like
0Likes
Like

Posted 18 October 2012 - 09:56 PM

Thanks this helped!

#6 FDsagizi   Members   -  Reputation: 514

Like
0Likes
Like

Posted 19 October 2012 - 03:46 AM

so next warning abaut this history Posted Image

"Implicit conversion of value is not exact"

script:

int w = 1920.0 * 0.3;


#7 Andreas Jonsson   Moderators   -  Reputation: 3238

Like
0Likes
Like

Posted 19 October 2012 - 11:22 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS