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

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

[100%] Building C object
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o
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.

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to