nathanchance / android-kernel-clang

Information on compiling Android kernels with Clang
291 stars 83 forks source link

incompatible pointer types initializing [-Werror,-Wincompatible-pointer-types] #7

Closed UchihaDev closed 5 years ago

UchihaDev commented 5 years ago

Compile script:= https://github.com/UchihaDev/HyperPlus-Pie/blob/master/build.sh Source:= https://github.com/UchihaDev/HyperPlus-Pie Error:= https://del.dog/eralajowop.rb Device:= Huawei P10 Plus Compiling with clang-r353983c

nathanchance commented 5 years ago

I'm not here to fix your warnings but I'll give you a hint: you have an extra parameter that is unused:

https://github.com/UchihaDev/HyperPlus-Pie/blob/master/kernel/cgroup_huawei/cgroup_pids.c#L418

https://github.com/UchihaDev/HyperPlus-Pie/blob/master/include/linux/cgroup-defs.h#L456

UchihaDev commented 5 years ago

Thanks a lot. If its not too much to ask, I would just like to know how you were able to debug the issue and come to the conclusion ?

nathanchance commented 5 years ago

You have to understand how function pointers work to understand what the warning is complaining about.

https://www.learn-c.org/en/Function_Pointers