lint comments


 
Thread Tools Search this Thread
Top Forums Programming lint comments
# 1  
Old 03-04-2006
lint comments

Hi
can anyone help me regarding the meaning of the following lint messages.
what is the use of having such lint comments in the c program.

/*lint -esym(534,cputs,fgets,cprintf) */
/*lint -efile(766,pragmas.h) */

Thanks a lot in advance.
axes
# 2  
Old 03-05-2006
probably you should have made use of lint command for coding and syntax errors for enhancing portabilty

compiler suppresses warnings about certain conditions when you place these comments at specific points in the source.

for esym - message # is suppressed for the accompanying symbol with esym
# 3  
Old 03-05-2006
Thanks matrixmadhan,

Actually I was going through code written by somebody else.

what are those numbers(534 and 766) and options -esym and -efile in the comments.

Is there any online help regarding the same so that I can learn how to and where to place these comments to maintain the portability.
axes
# 4  
Old 03-05-2006
The numbers are a warning message reference.

Basically, when you run lint on code you should see ZERO warnings, the stuff above is defeating the purpose of lint. Some shops require a clean lint output in order to push code to production. The previous coder either thought the warnings were pointless, or did not know how to correctly code the statement that caused the problem.

Matrix & I are trying to tell you that there should be no lint complaints at all.
# 5  
Old 03-05-2006
Thanks Jim and matrix
axes
# 6  
Old 01-05-2008
These are for Flexelint from Gimpel

Hi,

Found this thread while googling something related. Don't know if this is still an issue for you, but wanted to pass this info along:

We resell the Gimpel PC-lint/Flexelint product and the lint comments in question are for it.

-esym(534... instructs Flexelint to ignore the return value for the functions specified. Those are third-party calls and so can make sense to suppress analysis results on them.

-efile(766... instructs Flexelint to suppress message 766 for the file pragma.h. Message 766 tags #include directives whose named header file is not used at all in the enclosing source program. Again, since pragma.h is third-party, it can make sense to suppress analysis results on it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Problem with running lint

This is a strange problem that I can't figure out - I run lint on my C programs to weed out unused variables. The output can be quite large, so I use sed to cut out just unused variables section. The typical command looks like this: lint -I /usr/local/include -I./include -m hn.c As my... (3 Replies)
Discussion started by: migurus
3 Replies

2. Shell Programming and Scripting

Lint Command in unix

the thread is deleted (1 Reply)
Discussion started by: jhon1257
1 Replies

3. UNIX for Advanced & Expert Users

lint in unix

Hi All, Can any one help me in how to run "lint command " on .c files to list all functions with wrong return value in hp unix. Thanks in Advance. (1 Reply)
Discussion started by: jhon1257
1 Replies

4. UNIX for Dummies Questions & Answers

Delete Comments

Hello i am back :D, i have a prolem. I want to Delete the IPs which are in Comments. Input 192.168.0.1 192.168.0.2 #192.168.0.3 #192.168.0.4 - when TAB or Space, delete too. /*192.168.0.5 192.168.0.6 192.168.0.7*\ Output 192.168.0.1 192.168.0.2 My solution is sed -e... (7 Replies)
Discussion started by: eightball
7 Replies

5. Shell Programming and Scripting

Sed script, changing all C-comments to C++-comments

I must write a script to change all C++ like comments: // this is a comment to this one /* this is a comment */ How to do it by sed? With file: #include <cstdio> using namespace std; //one // two int main() { printf("Example"); // three }//four the result should be: (2 Replies)
Discussion started by: black_hawk
2 Replies

6. Shell Programming and Scripting

delete comments

Delete everything comes in between /* & */. Current File: ==================== create or replace procedure test421 is begin /* ---sasasas/*dsdsds */ dbms_output.put_line('SAURABH'); END; To be File: =================== create or replace procedure test421 is begin... (10 Replies)
Discussion started by: susau_79
10 Replies

7. AIX

[AIX] usages of lint for .cpp file?

Hi , I Want to apply AIX lint to my source code which all are *.cpp/*.h >lint test.cpp lint: 1286-332 File test.cpp must have a .c, .C or .ln extension. It is ignored. lint: 1286-334 There are no files to process. I am getting above error. -Ashok (3 Replies)
Discussion started by: ashokd001
3 Replies

8. Shell Programming and Scripting

lint and CFLAGS

I often find myself running lint in the following fashion: lint -Idir-1 ... -Idir-n some-src.c where a number of -Idirs should be coming from the make file. Here is example: $ cd dir1 $ grep ^CF makefile CFLAGS = -g -I ../ver1/include $ lint -I ../ver1/include sr1.c ... (0 Replies)
Discussion started by: migurus
0 Replies

9. UNIX for Dummies Questions & Answers

Purpose of lint in UNIX

Can Any One let me know abut the use on "lint" in UNIX...... (1 Reply)
Discussion started by: kumar_saurabh
1 Replies

10. Programming

Help from lint experts needed

how can i check my code with lint? What if the code containes multiple module? The check is been done on each module separately? What is the command to use the lint Any relevant site??? Thanks a lot. You are doing a great job.:cool: (2 Replies)
Discussion started by: amatsaka
2 Replies
Login or Register to Ask a Question