|
|
First, examine the function main() to see what parts of the code are not executed. Use the -x option to lprof to highlight the unexecuted lines:
while((c=getopt(argc, argv, "blcnsvi")) != EOF) [32] switch(c) { case 'v': [U] [34] vflag++; break; case 'c': [37] cflag++; break; case 'n': [40] nflag++; break; case 'b': [43] bflag++; break; case 's': [46] sflag++; break; case 'l': [49] lflag++; break; case 'i': [52] iflag++; break; case '?': [U] [55] errflg++; [56] }
Fragment of Output from lprof -x
The output shows that the -v option was not tested. By checking the documentation you can confirm that -v is an undocumented option. To correct this, create a test that exercises the -v option and add the -v option to the manual page.