Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HID-FT260: can't build on gcc-14 #23

Open
aayoub13 opened this issue Jul 30, 2024 · 4 comments
Open

HID-FT260: can't build on gcc-14 #23

aayoub13 opened this issue Jul 30, 2024 · 4 comments

Comments

@aayoub13
Copy link

execution returns error when gcc-14 is being used, caused by incompatible pointers for " tty_operations.write=ft260_uart_write "

@aayoub13
Copy link
Author

Fixed cafef7f

@MichaelZaidman
Copy link
Owner

Thanks for the confirmation. I made this change to fix the gcc-13 complaints. See 1b1a2c6. This change was not propagated to the uart upstream commit, and of course, we need to revert it in this repository also.

@aayoub13
Copy link
Author

aayoub13 commented Aug 1, 2024

Hello, the tty_struct declaration varies from a kernel to another, I distuinguished that on 6.5.0-44-generic, it compiles normally, meanwhile on 6.10.2-arch1-1 it doesn't. so If the mentioned fix is applied, the issue will be resolved on a version and appears on another.

as a workaround I added
EXTRA_CFLAGS += -Wno-incompatible-pointer-types
to the Make file when being built

@MichaelZaidman
Copy link
Owner

Correct. It's not because of the GCC but due to the kernel version. I've observed that the data type returned by the tty_operations write function was changed from int to size_t in this https://www.spinics.net/lists/kernel/msg4894944.html commit, which was merged into kernel v6.6-rc1. Since then, it has always been size_t.

While adding the -Wno-incompatible-pointer-types switch could be useful in this repository, it will not be accepted into the kernel upstream. Moreover, it might mask real issues during development, which could surface when it's compiled as a kernel built-in driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants