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

Dllloader cleanup #23220

Merged
merged 9 commits into from
May 10, 2023
Merged

Dllloader cleanup #23220

merged 9 commits into from
May 10, 2023

Conversation

lrusak
Copy link
Contributor

@lrusak lrusak commented Apr 30, 2023

This cleans up a ton of unused (possibly non working) code. This code has been around for a long time with little amount of change. I was finally able to untangle it which allows removing a few thousand lines.

The code has been generating a lot of warnings and instead of fixing the unused code we can just remove it. This allows us to focus on the code that is actually used.

The only real change is in Win32DllLoader but there should be no functional change.

This also drops support for the Dllloader class which isn't actually used on any currently supported platform.

There is more unused methods and members in some classes in cores/DllLoader but I wanted to do the minimal changes required to actually remove the bulk of the unused code.

What is the effect on users?

None

@lrusak lrusak added Type: Cleanup non-breaking change which removes non-working or unmaintained functionality Component: System v21 Omega labels Apr 30, 2023
@lrusak lrusak added this to the Omega 21.0 Alpha 2 milestone Apr 30, 2023
{ "ungetc", -1, (void*)dll_ungetc, NULL },
{ "_fdopen", -1, (void*)dll_fdopen, NULL },
{ "clearerr", -1, (void*)dll_clearerr, NULL },
{ "_close", -1, (void*)dll_close },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ "_close", -1, (void*)dll_close },
{ "_close", -1UL, (void*)dll_close },

Not directly related with this PR but changing -1 to -1UL fixes a lot of warnings:

04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(39,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]
04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(40,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]
04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(42,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]
04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(43,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]
04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(44,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]
04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(45,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]
04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(46,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]
04:56:31 C:\jenkins-workspace\workspace\WIN-64\xbmc\cores\DllLoader\Win32DllLoader.cpp(47,36): warning C4838: conversion from 'int' to 'unsigned long' requires a narrowing conversion [C:\jenkins-workspace\workspace\WIN-64\kodi-build.x64\libkodi.vcxproj]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea thanks. I can do some extra adjustments in a follow up PR.

lrusak added 9 commits May 1, 2023 19:27
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Copy link
Member

@thexai thexai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime tested Windows x64 and UWP-64

@fuzzard fuzzard merged commit 381ba74 into xbmc:master May 10, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: System Type: Cleanup non-breaking change which removes non-working or unmaintained functionality v21 Omega
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants