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:
As my includes can be in different places I put together a small script to build the proper -I directivesf or lint. When I run the script somehow lint can not follow -I directive. See the script below, I added echo just to show the command to be executed. When I cut/paste the command it runs without any issue:
This is the example input for the lint:
When I run the script, it can't see the hn1.h
Now I cut/paste the command from above:
I think you are quoting a little too aggressively. Try ${INCL} instead of "${INCL}" to let it split on spaces instead of cramming it into lint as one giant argument.
To see the difference, try printf "%s\n" "${INCL}" vs printf "%s\n" ${INCL}
Look at the top of every page in any thread you start. You will see the words "Edit Tags". Select those words to edit the tags for your thread (including the "solved" tag).
I have added the tags "lint" and "solved" to this thread for you.
This User Gave Thanks to Don Cragun For This Post:
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)
Hi all,
Running follow command on terminal;
$ glance -T cloudlive -I ubuntu -K ubuntu123 -N \
http://127.0.0.1:5000/v2.0/OpenX add name="cirros" is_public=true \
container_format=ovf disk_format=raw < \
/srv/cirros-0.3.0-x86_64-disk.img
It works without problem.
Putting it on a... (5 Replies)
Hey all,
I'm trying to execute a program and despite it appearing to be there, I keep getting this:
-bash: ./aisdispatcher: No such file or directoryTo run it, I'm going into the directory where it is stored and running
./aisdispatcher...the result of which should just be a listing of options... (10 Replies)
Hi, I have a difficulty running mpirun on my workstation, RHEL 4.
I have uninstalled lam-7.1.4 with 'rpm -e lam-7.1.4'. No problem.
The I downloaded openmpi-1.3.tar.gz. unzipped as normal. No problem.
Then did 'make clean'. Then './configure'. No problems.
Then I did 'make' and then 'make... (1 Reply)
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)
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)
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. (5 Replies)
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)