Error when compiling due to redefinition of int
hmtheboy154 opened this issue · comments
intel-precise-touch/src/resources.c
Line 55 in 8abe268
When compiling with AOSP clang, it will show redefinition error, so I have to fix it like this
hmtheboy154/Darkmatter-kernel@8f13146
The reason why this worked before was that the linux kernel didn't allow declaring a variable inside of the for statement. This was a somewhat recent change (less than a year ago I think) that I adopted because it makes the code a bit nicer.
I don't ususally test older kernels, so thank you for bringing this to my attention! I applied your patch, with some slight modifications so that I don't forget why that part of the code is different.
Although it is probably a good idea for me to move the other loop counters out of the for statement again too. Because if your compiler / kernel is still building for an older C standard, this might actually be undefined behaviour.
cool, I'll close the issue then