[cfe-dev] Newbie question on scan-build
Luong Nguyen-Duy
Luong.Nguyen-Duy at Sun.COM
Fri Mar 19 11:05:06 PDT 2010
Hi,
I am in need of some static code analyzer. I need a tool which can
track variables def/use accross function
boundary.
Following is a description of my problem:
I have a function A in which one of the incoming argument is declared as
(uint8_t *). Function A will assign values to this incoming argument:
int A (uint_8 *i) { *i = 255 };
now I need to change it to (uint32_t *)
Obviously I will need to track down all places which invoke function A,
and make changes to those
local variables, and recursively if a function B calls function A and
pass into A B's incoming argument I will
need to track down all invocation of B as well. Example below:
int B () {
unint_8 j; // NEED TO CATCH THIS
A(&j);
k = *j;
}
int C (unint_8 *k)
A(k); // NEED TO CATCH THIS
}
So the question is can I use scan-build to accomplish this?
Thanks much,
Luong
More information about the cfe-dev
mailing list