Return to Home
  View the contents of your Cart View cart  
  0 item(s) in cart  
  Checkout  

Gimpel Software - Discussion Forum
Discussion Forum
We invite you to use this forum to communicate with other PC-lint and FlexeLint users. You do not need to log in to post a message. WARNING: Your email address will not be encrypted. We recommend that you obfuscate it as protection from web crawlers. To receive technical support directly from Gimpel Software, please follow the guidelines at http://www.gimpel.com/html/support.htm
Gimpel Software - Discussion Forum
Subject From Date & Time
Prevent suppression of specific message Anders Wallander February 24, 2014
6:07:07 AM
  Re: Prevent suppression of specific message Ralf Hain February 24, 2014
7:25:59 AM
          Re: Prevent suppression of specific message February 24, 2014
10:37:31 AM
          Re: Prevent suppression of specific message Anders Wallander February 26, 2014
11:55:39 AM
  Re: Prevent suppression of specific message Ralf February 26, 2014
1:55:36 PM
          Re: Prevent suppression of specific message Anders Wallander February 27, 2014
2:40:28 AM
 
Subject: Prevent suppression of specific message
Date: February 24, 2014
6:07:07 AM
Name: Anders Wallander
Email: anders.wallander@ericsson.com
Message:
I'd like to prevent a user to suppress a specific 
message. For example I wouldn't want anybody to 
turn off '527 Unreachable'. I've tried with +e527 
in the lint config file, but that's still possible 
to suppress in the source code with //lint !e527

Please let me know if you know any way to prevent a 
user to suppress a specific message.
 
Reply to this Message! Previous Message Next Message
 
Subject: Re: Prevent suppression of specific message
Date: February 24, 2014
7:25:59 AM
Name: Ralf Hain
Email: at peiker.de
Message:
Hello,

+efreeze or ++efreeze will prevent the
suppression. Note that the order of options is
relevant, and this applies to the commandline, the
.lnt-files and the options inside code. If you
only want to freeze 527 Your_lint_options.lnt
should look like this:

  +e527 +efreeze +e123 +e456 ...

Maybe You have to sort Your_lint_options.lnt in a
way that the non-suppressables come first.

For a faster peek you can adapt the command line:

  lint-nt +e527 ++efreeze Your_lint_options.lnt *.c
Reply to this Message! Previous Message Next Message
 
Subject: Re: Prevent suppression of specific message
Date: February 24, 2014
10:37:31 AM
Message:
Thanks for your fast reply!
Reply to this Message! Previous Message Next Message
 
Subject: Re: Prevent suppression of specific message
Date: February 26, 2014
11:55:39 AM
Name: Anders Wallander
Email: anders.wallander@ericsson.com
Message:
Thanks! I tried the suggested method. But it seems 
like the +efreeze is not really doing what I want. 
If I follow your example (and I'm using flexelint) 
after +efreeze or ++efreeze I cannot suppress 
anything (which I must be able to). From the 
manual I read this:
"After the +efreeze option is given we are said to 
be in a frozen state. In a
frozen state the following options will have no 
effect.
-e
!e
...
"

The state further down in the manual that you need 
to unfreeze to be able to supress further:
 //lint -save -efreeze
 #include <lib.h>
 //lint -restore

But this would be cumbersome for the user to do 
everywhere, and wouldn't prevent suppressing 
unallowed messages.

Please let me know if you see some errors in my 
understanding of your example.
Reply to this Message! Previous Message Next Message
 
Subject: Re: Prevent suppression of specific message
Date: February 26, 2014
1:55:36 PM
Name: Ralf
Message:
Oh, I didn't understand your reqirements.
You could extend your_lint.sh like this:
 
  flexelint Your_lint_options.lnt *.c
  flexelint -w0 +e527 ++efreeze *.c

1st line like now.
2nd line added for the 527 (and other)
non-suppressables.
Drawback: slow on big projects.

Working with -passes could be faster; I have not
tried.
But it could interfere with your current setup.
Try it in the online-demo:

/*lint -w1 +e527 +e534   only for a tidy demo */
/*lint -passes(2,,+e527 ++efreeze)  maybe inside
                                   your_lint.sh */


/*lint -esym(534,tst1) should be active, no freeze. */
int tst1(void);

void tst2(void)
{
  return;
  int i=5; /*lint !e527  this we want
             to detect by the freeze */
  tst1();
}

Reply to this Message! Previous Message Next Message
 
Subject: Re: Prevent suppression of specific message
Date: February 27, 2014
2:40:28 AM
Name: Anders Wallander
Email: anders.wallander@ericsson.com
Message:
Thanks! Now it works as I wanted.
Reply to this Message! Previous Message Next Message