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

fix compiler warning with kernel version 6.6 #220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mfournier
Copy link

I came across this warning after upgrading from kernel 6.5 to 6.6.
The issue seems pretty similar to #139.

/home/marc/src/xmm7360-pci/xmm7360.c:1342:18: error: initialization of ‘ssize_t (*)(struct tty_struct *, const u8 *, size_t)’ {aka ‘long int (*)(struct tty_struct *, const unsigned char *, long unsigned int)’} from incompatible pointer type ‘int (*)(struct tty_struct *, const unsigned char *, int)’ [-Werror=incompatible-pointer-types]
 1342 |         .write = xmm7360_tty_write,
      |                  ^~~~~~~~~~~~~~~~~
/home/marc/src/xmm7360-pci/xmm7360.c:1342:18: note: (near initialization for ‘xmm7360_tty_ops.write’)

This patch fixes what the compiler complains about, and lets xmm7360 build again.

@mfournier
Copy link
Author

#215 and #219 are reporting this problem.

@ManDay
Copy link

ManDay commented Apr 29, 2024

Why are you not using ssize_t and size_t as the compiler demands?

@mfournier
Copy link
Author

@ManDay thanks ! For no other reason than: I'm incapable of reading properly 🤦
Updated in 3259b38.

@fasmide
Copy link

fasmide commented Jun 19, 2024

Just wanted to add these changes works on my machine :)

Linux archlinux 6.9.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 16 Jun 2024 19:06:37 +0000 x86_64 GNU/Linux

@bondany
Copy link

bondany commented Jul 15, 2024

Just wanted to add these changes works on my machine :)

Linux archlinux 6.9.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 16 Jun 2024 19:06:37 +0000 x86_64 GNU/Linux

Works for me too. 👍

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

Successfully merging this pull request may close these issues.

4 participants