[cfe-commits] r118224 - /cfe/trunk/tools/c-index-test/c-index-test.c

Frits van Bommel fvbommel at gmail.com
Thu Nov 4 04:16:45 PDT 2010

> +  clang_executeOnThread(thread_runner, &client_data, 0);

Both clang and gcc give a warning here. This is clang's:

[100%] Building C object
In file included from [...]/tools/clang/tools/c-index-test/c-index-test.c:1:
[...]/tools/clang/tools/c-index-test/c-index-test.c:1600:25: warning:
incompatible pointer types passing 'void *(void *)' to parameter
      of type 'void (*)(void *)'
  clang_executeOnThread(thread_runner, &client_data, 0);
In file included from [...]/tools/clang/tools/c-index-test/c-index-test.c:1:
In file included from [...]/tools/clang/tools/c-index-test/c-index-test.c:3:
[...]/tools/clang/include/clang-c/Index.h:2211:50: note: passing
argument to parameter 'fn' here
               void clang_executeOnThread(void (*fn)(void*), void *user_data,
1 warning generated.

It looks like you forgot to change the return type of thread_runner()
to void now that it's not directly passed to pthread_create() anymore.

More information about the cfe-commits mailing list