fix: remove unused local variables (#44822)

* chore: remove unused local non-trivial variable relaunch_executable

became unused in June 2016 in 0d066de5

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: only declare program_name local variable if used

We declared it everywhere but only used it on Windows

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: remove unused local non-trivial variable path from UnregisterXWindow

it became unused in 2020 by 72a08926

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-11-24 08:55:27 -06:00 committed by GitHub
parent 71c11496b7
commit 1ef8b47052
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 4 deletions

View file

@ -80,7 +80,6 @@ void GlobalMenuBarRegistrarX11::RegisterXWindow(x11::Window window) {
void GlobalMenuBarRegistrarX11::UnregisterXWindow(x11::Window window) {
DCHECK(registrar_proxy_);
std::string path = electron::GlobalMenuBarX11::GetPathForWindow(window);
ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/314087
// TODO(erg): The mozilla implementation goes to a lot of callback trouble