I put some obvious errors in the code and add --info to smatch, but the output does't change at all : if [ ! -d "objs" ]; then \ mkdir -p objs; \\ mkdir -p objs; \\ if [ ! -d "bin" ]; then \ \ mkdir -p bin; \ \ mkdir -p bin; \fi core/ make -C core/ make[1]: Entering directory '/home/lsc20011130/NtyCo/core' /home/lsc20011130/smatch/cgcc -c nty_epoll.c -o /home/lsc20011130/NtyCo/objs/nty_epoll.o -lpthread -O3 -ldl -I /home/lsc20011130/NtyCo/core /home/lsc20011130/smatch/cgcc -c nty_coroutine.c -o /home/lsc20011130/NtyCo/objs/nty_coroutine.o -lpthread -O3 -ldl -I /home/lsc20011130/ NtyCo/core /home/lsc20011130/smatch/cgcc -c nty_socket.c -o /home/lsc20011130/NtyCo/objs/nty_socket.o -lpthread -O3 -ldl -I /home/lsc20011130/NtyCo/core core /home/lsc20011130/smatch/cgcc -c nty_schedule.c -o /home/lsc20011130/NtyCo/objs/nty_schedule.o -lpthread -O3 -ldl -I /home/lsc20011130/ NtyCo/core make[1]: Leaving directory '/home/lsc20011130/NtyCo/core' ar rcs libntyco.a /home/lsc20011130/NtyCo/objs/nty_socket.o /home/lsc20011130/NtyCo/objs/nty_coroutine.o /home/lsc20011130/NtyCo/objs/ nty_epoll.o /home/lsc20011130/NtyCo/objs/nty_schedule.o Sparse is clearly not working, I'm confused. regards, Lishu Chang "李书畅" <lishuchang@xxxxxxxxxxx>写道: > I realized that my previous statement was wrong. > In this case, as I tried : make CHECK="/home/lsc20011130/smatch/smatch" CC=/home/lsc20011130/smatch/cgcc, > the output is: > > if [ ! -d "objs" ]; then \ > mkdir -p objs; \\ > mkdir -p objs; \\ > if [ ! -d "bin" ]; then \ \ > mkdir -p bin; \ \ > mkdir -p bin; \fi > core/ > make -C core/ > make[1]: Entering directory '/home/lsc20011130/NtyCo/core' > /home/lsc20011130/smatch/cgcc -c nty_epoll.c -o /home/lsc20011130/NtyCo/objs/nty_epoll.o -lpthread -O3 -ldl -I /home/lsc20011130/NtyCo/core > /home/lsc20011130/smatch/cgcc -c nty_coroutine.c -o /home/lsc20011130/NtyCo/objs/nty_coroutine.o -lpthread -O3 -ldl -I /home/lsc20011130/ NtyCo/core > /home/lsc20011130/smatch/cgcc -c nty_socket.c -o /home/lsc20011130/NtyCo/objs/nty_socket.o -lpthread -O3 -ldl -I /home/lsc20011130/NtyCo/core core > /home/lsc20011130/smatch/cgcc -c nty_schedule.c -o /home/lsc20011130/NtyCo/objs/nty_schedule.o -lpthread -O3 -ldl -I /home/lsc20011130/ NtyCo/core > make[1]: Leaving directory '/home/lsc20011130/NtyCo/core' > ar rcs libntyco.a /home/lsc20011130/NtyCo/objs/nty_socket.o /home/lsc20011130/NtyCo/objs/nty_coroutine.o /home/lsc20011130/NtyCo/objs/ nty_epoll.o /home/lsc20011130/NtyCo/objs/nty_schedule.o > > cgcc runs, but sparse doesn't seem to work successfully. > > regards, > Lishu Chang > > > > -----原始邮件----- > > 发件人: "Dan Carpenter" <dan.carpenter@xxxxxxxxxx> > > 发送时间: 2024-03-11 13:00:42 (星期一) > > 收件人: "李书畅" <lishuchang@xxxxxxxxxxx> > > 抄送: smatch@xxxxxxxxxxxxxxx > > 主题: Re: Re: Re: Re: Re: Re: about using smatch in all debian C code > > > > On Sun, Mar 10, 2024 at 01:39:41PM +0800, 李书畅 wrote: > > > I figure it out, I tried > > > CHECK="/home/lsc20011130/smatch/smatch /home/lsc20011130/NtyCo/core" CC=/home/lsc20011130/smatch/cgcc make , and it works fine. > > > > > > > I don't think you want to add the "/home/lsc20011130/NtyCo/core" part... > > > > But I'm happy that it's working. Don't hesitate to ask if you run into > > more issues. > > > > regards, > > dan carpenter