Thanks Dan for your reply to me, I get it. I'll give up making smatch work on qemu, and find some other C projects outside of the Linux kernel, which have simpler makefiles. So that it's easier for smatch to run on them. Do you have any advice on which C programs to choose? regards, Lishu Chang > -----原始邮件----- > 发件人: "Dan Carpenter" <dan.carpenter@xxxxxxxxxx> > 发送时间: 2024-03-07 17:49:00 (星期四) > 收件人: "李书畅" <lishuchang@xxxxxxxxxxx> > 抄送: smatch@xxxxxxxxxxxxxxx > 主题: Re: Re: Re: Re: about using smatch in all debian C code > > I figured it out. You need to: > > export CHECK="/home/user/smatch/smatch --file-output" > > Then you can't use ~/ in the --cc option. It has to be > /home/user/smatch/cgcc. But then Smatch/Sparse still doesn't compile > the code correctly. There are tons of compile errors. This is really > a Sparse problem (Smatch uses Sparse as a parser). I suspect that > fixing it will be difficult. > > regards, > dan carpenter