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

Function calls must adhere to their prototypes #3234

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

BsAtHome
Copy link
Contributor

Several function calls added arguments to the function call but the functions in question do not take any arguments.

@andypugh
Copy link
Collaborator

It does take an argument in the upstream version, curiously.
https://github.com/MaVaTi56/classicladder/blob/main/src/classicladder_gtk.h#L46

This feels like a merge error during the update to Gtk3:
https://github.com/LinuxCNC/linuxcnc/commits/master/src/hal/classicladder/classicladder_gtk.c

@BsAtHome
Copy link
Contributor Author

I don't know about any merges, but the functions UpdateVScrollBar() (hal/classicladder/classicladder_gtk.c:211) and SerialOpen() (hal/classicladder/serial_linux.c:50) are defined without having any arguments.

It is my understanding that LinuxCNC's version has diverged considerably from the upstream version. There are two options: 1) fix all warnings in upstream and get in sync with upstream, or 2) fix the local version.

I think that option 2 is the only viable option at this time.

@andypugh
Copy link
Collaborator

I think I would prefer to look at the changes necessary to allow "auto select current rung" to work, as that sounds good.
But I don't see me doing it, so will merge this.

@andypugh andypugh merged commit c625bc2 into LinuxCNC:master Dec 21, 2024
10 checks passed
@BsAtHome
Copy link
Contributor Author

I just took a look at the original and compiled it. The versions LCNC and source are essentially more than 10 years apart.

However, that is not the worst of. It would be possible to port again, but the current source version has over 350 compiler warnings (many are GTK deprecation warnings requiring partial rewrites). And I haven't even used -Wextra. Fixing all this in upstream and then porting to LCNC is a lot of work. I'm not sure it is worth the effort.

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.

2 participants