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

unused `UMockdev.IoctlBase.unregister_{path,all} #138

Open
martinpitt opened this issue Aug 25, 2021 · 3 comments
Open

unused `UMockdev.IoctlBase.unregister_{path,all} #138

martinpitt opened this issue Aug 25, 2021 · 3 comments
Assignees

Comments

@martinpitt
Copy link
Owner

Building gives these two warnings:

../src/umockdev-ioctl.vala:771.5-771.33: warning: method `UMockdev.IoctlBase.unregister_path' never used
    internal void unregister_path(string devnode)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

../src/umockdev-ioctl.vala:777.5-777.32: warning: method `UMockdev.IoctlBase.unregister_all' never used
    internal void unregister_all()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@benzea , are these supposed to be used in some destructors, or are they just leftovers and can be dropped?

(I'm currently cleaning up the plethora of warnings, and these two I'm not sure about)

@benzea
Copy link
Collaborator

benzea commented Aug 25, 2021

Neither :-/

It is a side effect of umockdev-ioctl.vala being included in the build of multiple binaries.

@benzea
Copy link
Collaborator

benzea commented Aug 25, 2021

IIRC, the reason was that I would have needed to make some more API public otherwise. Though, at this point, it is likely possible to split the file into multiple parts in order to avoid doing so.

martinpitt added a commit that referenced this issue Sep 12, 2021
Avoid the duplicate static linking of the ioctl sources in
umockdev-record, and link it to libumockdev instead. The corresponding
symbols are already public in the C API anyway (as they match
src/umockdev.map), so just move the previously `internal`
classes/methods to `public`.

This also avoids confusing complaints about allegedly unused methods.

Fixes #138
@martinpitt
Copy link
Owner Author

I proposed a fix in #148

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 a pull request may close this issue.

2 participants