[PR #600] [MERGED] Try to eliminate compile warnings #8398

Closed
opened 2026-02-07 05:43:28 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/600
Author: @hawken93
Created: 1/17/2019
Status: Merged
Merged: 1/24/2019
Merged by: @Bond-009

Base: devHead: compile_warnings


📝 Commits (5)

  • 8fe90fb Remove unused in SocketHttpListener/WebSocket.cs
  • cc322c6 Remove unused timer/timeoutstuff in SocketHttpListener
  • 7a5b09f Remove unused EntityBody* in SocketHttpListener
  • 6bf4723 Remove unused in MediaBrowser.Controller
  • 47fc19b Remove unused in Mono.Nat

📊 Changes

6 files changed (+1 additions, -47 deletions)

View changed files

📝 MediaBrowser.Controller/Entities/BaseItem.cs (+1 -1)
📝 Mono.Nat/Upnp/Searchers/UpnpSearcher.cs (+0 -6)
📝 SocketHttpListener/HttpBase.cs (+0 -18)
📝 SocketHttpListener/HttpResponse.cs (+0 -4)
📝 SocketHttpListener/Net/HttpConnection.cs (+0 -9)
📝 SocketHttpListener/WebSocket.cs (+0 -9)

📄 Description

Trying to remove compilation warnings.

Here are some I'm not experienced enough to fix:

  • Some of them are classes with public events that are there because they are required by an interface. They may be used from another class somehow, but the compiler still calls them unused.
  • async methods running synchronously, probably because they are stubs. Some of the stubs have TODOs on them, so refactoring them away will just create more work. Other stubs may be worth taking a look at.
  • Warning about a call that is not awaited (what does this even mean? Wait for it to complete?), recommends adding await but that might break the whole point of launching a process to the background
  • exception ex that is only read in debug compiles

If you can help me remove more of the warnings, I will probably learn more about C#.

Changes

  • Remove some unused variables
  • remove duplicate "using .." by sorting and deduping the list
  • Remove things that already exist in the parent class (in one case I moved some documentation to the parent)
  • EntityBodyData and and NextSearch were never set (only read), removed
  • _timeout was never read, subsequently _timer became unused. part of a TODO timeout functionality that was not implemented yet

Issues
None, but it may create some :-p Alternately, the issues we don't know about yet.

By moving some stuff to the parent class, the logic seems more correct so I assume this will fix some issues that can stem from the parent class not having correct data. I checked that removed functions were implemented exactly the same and depended on common factors only.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/600 **Author:** [@hawken93](https://github.com/hawken93) **Created:** 1/17/2019 **Status:** ✅ Merged **Merged:** 1/24/2019 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `dev` ← **Head:** `compile_warnings` --- ### 📝 Commits (5) - [`8fe90fb`](https://github.com/jellyfin/jellyfin/commit/8fe90fbb6ad862a1c902f3b12b00319e58584b12) Remove unused in SocketHttpListener/WebSocket.cs - [`cc322c6`](https://github.com/jellyfin/jellyfin/commit/cc322c65baae3951bc91812ac92c0bce7f1fd5b3) Remove unused timer/timeoutstuff in SocketHttpListener - [`7a5b09f`](https://github.com/jellyfin/jellyfin/commit/7a5b09f9b596d32c38035adeef72f91f25c4b644) Remove unused EntityBody* in SocketHttpListener - [`6bf4723`](https://github.com/jellyfin/jellyfin/commit/6bf4723aad604f10703a02dc809d2c3399e13db8) Remove unused in MediaBrowser.Controller - [`47fc19b`](https://github.com/jellyfin/jellyfin/commit/47fc19b6939428eead22e0d21dcc24cbcfbb6ae6) Remove unused in Mono.Nat ### 📊 Changes **6 files changed** (+1 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Controller/Entities/BaseItem.cs` (+1 -1) 📝 `Mono.Nat/Upnp/Searchers/UpnpSearcher.cs` (+0 -6) 📝 `SocketHttpListener/HttpBase.cs` (+0 -18) 📝 `SocketHttpListener/HttpResponse.cs` (+0 -4) 📝 `SocketHttpListener/Net/HttpConnection.cs` (+0 -9) 📝 `SocketHttpListener/WebSocket.cs` (+0 -9) </details> ### 📄 Description Trying to remove compilation warnings. Here are some I'm not experienced enough to fix: * Some of them are classes with public events that are there because they are required by an interface. They may be used from another class somehow, but the compiler still calls them unused. * async methods running synchronously, probably because they are stubs. Some of the stubs have TODOs on them, so refactoring them away will just create more work. Other stubs may be worth taking a look at. * Warning about a call that is not awaited (what does this even mean? Wait for it to complete?), recommends adding await but that might break the whole point of launching a process to the background * exception ex that is only read in debug compiles If you can help me remove more of the warnings, I will probably learn more about C#. **Changes** * Remove some unused variables * remove duplicate "using .." by sorting and deduping the list * Remove things that already exist in the parent class (in one case I moved some documentation to the parent) * EntityBodyData and and NextSearch were never set (only read), removed * _timeout was never read, subsequently _timer became unused. part of a TODO timeout functionality that was not implemented yet **Issues** None, but it may create some :-p Alternately, the issues we don't know about yet. By moving some stuff to the parent class, the logic seems more correct so I assume this will fix some issues that can stem from the parent class not having correct data. I checked that removed functions were implemented exactly the same and depended on common factors only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 05:43:28 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#8398