diff options
author | Christopher Li <sparse@chrisli.org> | 2006-11-30 02:11:36 -0800 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2006-12-04 23:27:58 -0800 |
commit | 4ad8ad708f80c91e70f8491e4d62dccc40358887 (patch) | |
tree | 7d09aa58e537095a1567568913ab233408dfc835 /test-unssa.c | |
parent | delay removing file scope (diff) | |
download | sparse-4ad8ad708f80c91e70f8491e4d62dccc40358887.tar.gz sparse-4ad8ad708f80c91e70f8491e4d62dccc40358887.tar.bz2 sparse-4ad8ad708f80c91e70f8491e4d62dccc40358887.zip |
cleanup write to argument array hack
The sparse interface is a kind of snaky that it change the input argument
array. The function sparse() does the same hack just to skip the files.
This patch add the ptr list for string. So sparse_initialize will
return list of file to compile. The string pointer is not aligned
at word boundary. This patch introduce non taged version of the ptr
list iteration function.
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'test-unssa.c')
-rw-r--r-- | test-unssa.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test-unssa.c b/test-unssa.c index 15ff9d7..88ce025 100644 --- a/test-unssa.c +++ b/test-unssa.c @@ -74,8 +74,13 @@ static int compile(struct symbol_list *list) int main(int argc, char **argv) { - compile(sparse_initialize(argc, argv)); - while (*argv) - compile(sparse(argv)); + struct string_list * filelist = NULL; + char *file; + + compile(sparse_initialize(argc, argv, &filelist)); + FOR_EACH_PTR_NOTAG(filelist, file) { + compile(sparse(file)); + } END_FOR_EACH_PTR_NOTAG(file); + return 0; } |